-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Added RectangleSelector.geometry docstring #9031
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
Added RectangleSelector.geometry docstring #9031
Conversation
Docstring contains details specific to RectangleSelector and does not fully generalize to EllipseSelector.
lib/matplotlib/widgets.py
Outdated
@@ -2334,6 +2334,11 @@ def _set_active_handle(self, event): | |||
|
|||
@property | |||
def geometry(self): | |||
""" | |||
Returns numpy.ndarray of shape (2,5) containing x (RectangleSelector.geometry[1:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the lines need to be wrapped to < 80 characters for PEP8 tests to pass.
Wrapped docstring to <80 characters
lib/matplotlib/widgets.py
Outdated
@@ -2334,6 +2334,12 @@ def _set_active_handle(self, event): | |||
|
|||
@property | |||
def geometry(self): | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this before, but the whole string will need to be indented by 4 spaces (instead of the current 2) to line up with the if statement below.
Looks like it's still failing on PEP8 checks - the easiest way to check this in advance is using a text editor like Atom which has a PEP8 linter. The specific error is that there's whitespace at the end of some of the lines, so removing the whitespace should remove the error. |
@meeseeksdev backport to v2.1.x |
@meeseeksdev backport to v2.1.x |
Docstring contains details specific to RectangleSelector and does not fully generalize to EllipseSelector. <!--Thank you so much for your PR! To help us review, fill out the form to the best of your ability. Please make use of the development guide at https://matplotlib.org/devdocs/devel/index.html--> <!--Provide a general summary of your changes in the title above, for example "Raises ValueError on Non-Numeric Input to set_xlim". Please avoid non-descriptive titles such as "Addresses issue 8576".--> <!--If you are able to do so, please do not create the PR out of master, but out of a separate branch. See https://matplotlib.org/devel/gitwash/development_workflow.html for instructions.--> PR Summary <!--Please provide at least 1-2 sentences describing the pull request in detail. Why is this change required? What problem does it solve?--> Matplotlib documentation is missing details concerning the geometry attribute for RectangleSelector. This change provides a docstring for said attribute which is specific to RectangleSelector and not generalizable to EllipseSelector. <!--If it fixes an open issue, please link to the issue here.--> PR Checklist - [ x] Has Pytest style unit tests - [ x] Code is PEP 8 compliant - [ x] New features are documented, with examples if plot related - [ x] Documentation is sphinx and numpydoc compliant - [ x] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) - [x ] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way <!--We understand that PRs can sometimes be overwhelming, especially as the reviews start coming in. Please let us know if the reviews are unclear or the recommended next step seems overly demanding , or if you would like help in addressing a reviewer's comments. And please ping us if you've been waiting too long to hear back on your PR.-->
Backport PR #9031 on branch v2.1.x
Docstring contains details specific to RectangleSelector and does not fully generalize to EllipseSelector.
PR Summary
Matplotlib documentation is missing details concerning the geometry attribute for RectangleSelector.
This change provides a docstring for said attribute which is specific to RectangleSelector and
not generalizable to EllipseSelector.
PR Checklist