Skip to content

CI: add validate_unwanted_patterns to known_third_parties #35021

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 5 commits into from
Jul 7, 2020

Conversation

MarcoGorelli
Copy link
Member

  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff

By using seed-isort-config, the known_third_party setting is automatically populated and alphabetically sorted. This is a cleaner solution which doesn't require manually adding third parties to setup.cfg.

Furthermore, it catches an existing inconsistency: currently, validate_docstrings is set as a known third party, while validate_unwanted_patterns isn't. Neither should be, IMO.

@TomAugspurger
Copy link
Contributor

We had this and removed it in #28272 (see some discussions there). I think I struggled the most with it, dunno if it hit other contributors.

@MarcoGorelli
Copy link
Member Author

@TomAugspurger thanks for pointing me towards that - OK, am happy to not add seed-isort-config if it causes issues.

Should validate_docstrings be removed from the list of known_third_parties though?

@TomAugspurger
Copy link
Contributor

Don't know. It's not in the pandas namespace, so probably not? Don't have a strong preference though.

@MarcoGorelli
Copy link
Member Author

MarcoGorelli commented Jun 30, 2020

Sure - have removed seed-isort-config and added validate_unwanted_patterns to the list of known 3rd parties (I presume they should either both be there, or neither?)

@MarcoGorelli MarcoGorelli changed the title CI: fix known_third_party isort setting CI: add validate_unwanted_patterns to known_third_parties Jun 30, 2020
@jreback jreback added the Code Style Code style, linting, code_checks label Jun 30, 2020
@WillAyd
Copy link
Member

WillAyd commented Jul 6, 2020

I think this is fine

@jreback jreback added this to the 1.1 milestone Jul 6, 2020
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm

@TomAugspurger TomAugspurger merged commit 42a6d44 into pandas-dev:master Jul 7, 2020
@TomAugspurger
Copy link
Contributor

Thanks!

@MarcoGorelli MarcoGorelli deleted the seed-isort branch July 7, 2020 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants