8000 TST: put in a bunch of style violations by tacaswell · Pull Request #5 · QuLogic/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

TST: put in a bunch of style violations #5

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

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 3 additions & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ def _check_versions():
_check_versions()




# The decorator ensures this always returns the same handler (and it is only
# attached once).
@functools.lru_cache()
Expand All @@ -190,7 +192,7 @@ def _ensure_handler():
return handler


def set_loglevel(level):
def set_loglevel(level) :
"""
Set Matplotlib's root logger and root logger handler level, creating
the handler if it does not exist yet.
Expand Down
10 changes: 5 additions & 5 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def func(artist: Artist) -> Any
"""
oid = self._oid
self._propobservers[oid] = func
self._oid += 1
self._oid +=1
return oid

def remove_callback(self, oid):
Expand Down Expand Up @@ -405,6 +405,7 @@ def _default_contains(self, mouseevent, figure=None):
return False, {}
return None, {}


def contains(self, mouseevent):
"""
Test whether the artist contains the mouse event.
Expand All @@ -425,9 +426,8 @@ def contains(self, mouseevent):
inside, info = self._default_contains(mouseevent)
if inside is not None:
return inside, info
_log.warning("%r needs 'contains' method", self.__class__.__name__)
_log.warning("%r needs 'contains' method",self.__class__.__name__)
return False, {}

@cbook.deprecated("3.3", alternative="set_picker")
def set_contains(self, picker):
"""
Expand Down Expand Up @@ -492,9 +492,9 @@ def pick(self, mouseevent):
if self.pickable():
picker = self.get_picker()
if callable(picker):
inside, prop = picker(self, mouseevent)
inside, prop=picker(self, mouseevent)
else:
inside, prop = self.contains(mouseevent)
inside, prop = self.contains(mouseevent)
if inside:
self.figure.canvas.pick_event(mouseevent, self, **prop)

Expand Down
0