-
Notifications
You must be signed in to change notification settings - Fork 216
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
Let Flake8 check examples and fix warnings #1477
Conversation
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.
I'm OK with these changes.
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.
My eyes glossed over after scanning through diffs on 30-ish files... But ok with merging this big diff since you've done the hard work already. Thanks!
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Any ideas what's wrong with the windows tests? |
The Windows tests fail randomly sometimes. Maybe restart the tests (usually I would just ignore it, but since this is a big PR, best be safe). |
FYI, I just restarted the tests. |
Thanks @seisman, all tests pass now! I'll merge this in. |
This PR enables flake8 checking of the examples directory and fixes resulting warnings. * Update line lengths in gallery * Update line lengths for tutorials * Update whitespace and line length in projection gallery * Update rose line length * Fix invalid escape sequences * Fix grdsample sphinx warning * Update examples/gallery/symbols/datetime_inputs.py * Format grdlandmask example Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Description of proposed changes
This PR enables flake8 checking of the examples directory and fixes resultant warnings.
The diff is very large because of the line length configuration (opinions welcome for whether this is worth the benefit of having style checks for the examples).
Fixes #948
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version