Skip to content
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

Handful of isort changes and fixes #2756

Closed
wants to merge 6 commits into from

Conversation

matthewturk
Copy link
Member

This reformats a few of the files that were still failing, and it
changes the setup.cfg section to be isort rather than tool:isort, which
seems to be the right thing for isort 4.3.

@matthewturk matthewturk added bug code style Related to linting tools labels Jul 17, 2020
Copy link
Member

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

left two comments to further improve stability of isort results.
Thanks for cleaning up this mess !

.travis.yml Outdated Show resolved Hide resolved
@neutrinoceros
Copy link
Member

neutrinoceros commented Jul 18, 2020

So @cphyc showed that there are yet again inconsistent results with isort on travis (see #2759)
This is because I ran isort 4.3.21 locally, while travis is running 4.3.0 (I didn't pin the last digit and didn't anticipate pip would read it as 4.3.0). Meanwhile, I've also tried the latest release 5.1.2 (only a few hours old !) and it fixes even more bugs (most notably, it now supports Cython files !) so I think we should simply pin this one.

note that, starting from isort 5.0, the -rc (recursive) option is implicit so it can be removed.
@matthewturk , do you agree to make those infrastructure changes in this PR ? We can open a follow up PR with the new isort pass afterwards.
here's what's needed:

  • update tests/lint_requirements.txt to pin the latest version
  • update .travis.yml and .github/PULL_REQUEST_TEMPLATE.md (remove the -rc flag)

edit: isort 5.1.3 just came out, looks like it's actively under development for bugfixes these days, so we probably don't want to pin an exact version for now.

@matthewturk
Copy link
Member Author

Went ahead and updated as per your suggestion!

@@ -23,6 +23,7 @@ exclude = doc,

# individual files
yt/visualization/_mpl_imports.py,
yt/utilities/command_line.py,
Copy link
Member

Choose a reason for hiding this comment

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

you should also remove the inline comment in that file (might need to rebase this branch :/)

@matthewturk
Copy link
Member Author

So, unfortunately, I'm struggling to get this to all work. Can we take this as-is and remove the comment in another PR?

@matthewturk
Copy link
Member Author

(As in, specifically, getting the git commit hook to work with the version of isort that also works here etc etc)

@neutrinoceros
Copy link
Member

So, unfortunately, I'm struggling to get this to all work. Can we take this as-is and remove the comment in another PR?

sure, works for me

Copy link
Member

@cphyc cphyc left a comment

Choose a reason for hiding this comment

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

LGTM!

@neutrinoceros
Copy link
Member

note that linting is expected to fail here, and is fixed by the companion PR #2764

@neutrinoceros
Copy link
Member

In the end it turns out this branch isn't necessary after tests passed in #2764, so as we agreed on slack I'm closing this :)

@neutrinoceros
Copy link
Member

(turns out there's no "close" button on the mobile app yet !)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code style Related to linting tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants