8000 Is bool by timhoffm · Pull Request #12051 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Is bool #12051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2018
Merged

Is bool #12051

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@ def inner(ax, *args, data=None, **kwargs):
if not isinstance(label, str):
label = None

if (replace_names is None) or (replace_all_args is True):
if replace_names is None or replace_all_args:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just get #10928 merged instead.

# all should be replaced
args = tuple(_replacer(data, a) for
j, a in enumerate(args))
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/backends/_backend_tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ def _update_pointer_position(self, guiEvent=None):
self.leave_notify_event(guiEvent)

def draw_idle(self):
'update drawing area only if idle'
if self._idle is False:
"""Update the drawing area if idle."""
if not self._idle:
return

self._idle = False
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/bezier.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def split_path_inout(path, inside, tolerence=0.01, reorder_inout=False):
path_out = Path(concat([verts_right, path.vertices[i:]]),
concat([codes_right, path.codes[i:]]))

if reorder_inout and begin_inside is False:
if reorder_inout and not begin_inside:
path_in, path_out = path_out, path_in

return path_in, path_out
Expand Down
6 changes: 3 additions & 3 deletions lib/matplotlib/tests/test_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_patch_transform_of_none():
# Providing a transform of None puts the ellipse in device coordinates.
e = mpatches.Ellipse(xy_pix, width=120, height=120, fc='coral',
transform=None, alpha=0.5)
assert e.is_transform_set() is True
assert e.is_transform_set()
ax.add_patch(e)
assert isinstance(e._transform, mtransforms.IdentityTransform)

Expand All @@ -51,10 +51,10 @@ def test_patch_transform_of_none():
e = mpatches.Ellipse(xy_pix, width=120, height=120, fc='coral',
alpha=0.5)
intermediate_transform = e.get_transform()
assert e.is_transform_set() is False
assert not e.is_transform_set()
ax.add_patch(e)
assert e.get_transform() != intermediate_transform
assert e.is_transform_set() is True
assert e.is_transform_set()
assert e._transform == ax.transData


Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/tests/test_legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def test_legend_title_empty():
ax.plot(range(10))
leg = ax.legend()
assert leg.get_title().get_text() == ""
assert leg.get_title().get_visible() is False
assert not leg.get_title().get_visible()


def test_legend_proper_window_extent():
Expand Down
0