Skip to content

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

Merged

Conversation

tropfcode
Copy link
Contributor

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

  • [ 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

Docstring contains details specific to RectangleSelector and does not fully generalize to EllipseSelector.
@@ -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:])
Copy link
Member

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.

@dstansby dstansby self-assigned this Aug 18, 2017
@@ -2334,6 +2334,12 @@ def _set_active_handle(self, event):

@property
def geometry(self):
"""
Copy link
Member

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.

@dstansby
Copy link
Member

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.

@dstansby dstansby merged commit a7ec9d3 into matplotlib:master Sep 21, 2017
@dstansby dstansby removed their assignment Sep 21, 2017
@tacaswell
Copy link
Member

@meeseeksdev backport to v2.1.x

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Sep 21, 2017
@tacaswell
Copy link
Member

@meeseeksdev backport to v2.1.x

lumberbot-app bot pushed a commit that referenced this pull request Sep 21, 2017
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.-->
tacaswell added a commit that referenced this pull request Sep 22, 2017
@tropfcode tropfcode deleted the Rectangle-Selector-geometry-docstring branch February 21, 2018 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants