Skip to content

[chore] Pre commit to python 3.7 #349

Closed
blefaudeux wants to merge 2 commits intomasterfrom
pre-commit-3.6
Closed

[chore] Pre commit to python 3.7 #349
blefaudeux wants to merge 2 commits intomasterfrom
pre-commit-3.6

Conversation

@blefaudeux
Copy link
Copy Markdown
Contributor

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
  • Did you read the contributor guideline?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

pre-commit was still set to the python 3.6 language model, which meant that dataclasses was added as a dependency. Fixing that

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 1, 2021
@blefaudeux blefaudeux requested a review from min-xu-ai February 1, 2021 19:10
Comment thread pyproject.toml
skip_glob = ["build/*", "stubs/*"]
# Don't split "import" and "from".
force_sort_within_sections = true
known_third_party = ["benchmark_dataset", "dataclasses", "datasets", "golden_configs", "helpers", "models", "numpy", "pytest", "recommonmark", "setuptools", "torch", "torch_pg", "torchtext", "torchvision"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've made the same change after @msbaines 's comment in PR:#348.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is not enough, the pre-commit file also needs to be fixed, that's what I'm trying to say. This file is updated automatically

Comment thread .pre-commit-config.yaml
hooks:
- id: black
language_version: python3.6
language_version: python3.7
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is what changed the file below, because dataclasses were not part of 3.6 > added as a dependency -> means that import order needs to be changed (pure python and deps are not sorted the same way) -> broken lint when isort against 3.7

@blefaudeux
Copy link
Copy Markdown
Contributor Author

dupe with #348

@blefaudeux blefaudeux closed this Feb 1, 2021
@blefaudeux blefaudeux deleted the pre-commit-3.6 branch February 11, 2021 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants