Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Whitespace/braces/#defines cleanup to macosx. #21690

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
Nov 22, 2021

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Nov 20, 2021

PR Summary

This should not change any code logic.

I intentionally did not touch the parts currently worked on by the key-modifier and subplot_tool PRs.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

Copy link
Contributor

@greglucas greglucas left a comment

Choose a reason for hiding this comment

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

I agree, this does look nicer.
This guide https://google.github.io/styleguide/objcguide.html also seems to imply that you could move a bunch of the start method braces up onto the method definition line too if you wanted. Although I'm guessing your linter didn't suggest that ;)

@anntzer
Copy link
Contributor Author

anntzer commented Nov 20, 2021

I personally like function braces on their own lines (https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces ("Heretic people all over the world have claimed that this inconsistency is … well … inconsistent, but all right-thinking people know that (a) K&R are right and (b) K&R are right. Besides, functions are special anyway (you can’t nest them in C)." -- mostly the last part is relevant :-)) It's also consistent with PEP7.

@anntzer anntzer force-pushed the macosxmaint branch 2 times, most recently from d5fd9ec to 42c3753 Compare November 22, 2021 09:08
@anntzer
Copy link
Contributor Author

anntzer commented Nov 22, 2021

Edit: additionally commented out and gave a more meaningful name to the unused arg to choose_save_file and set_cursor.

@tacaswell tacaswell added this to the v3.6.0 milestone Nov 22, 2021
@tacaswell
Copy link
Member

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

I approve modulo fixing the build issues. @anntzer can self merge when CI is green.

@anntzer
Copy link
Contributor Author

anntzer commented Nov 22, 2021

oops, turns out there's some versions where you can't unset arg names, so I undid #21690 (comment).

@anntzer
Copy link
Contributor Author

anntzer commented Nov 22, 2021

selfmerging per the above.

@anntzer anntzer merged commit e73b1be into matplotlib:main Nov 22, 2021
@anntzer anntzer deleted the macosxmaint branch November 22, 2021 17:21
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