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

Move isort config to pyproject.toml and add black profile #90

Merged
merged 1 commit into from Dec 21, 2021

Conversation

zero323
Copy link
Contributor

@zero323 zero323 commented Dec 21, 2021

This PR:

  • Removes profile=black option for isort from CI and adds it to respective configuration
  • Moves isort config into pyproject.toml and drops setup.cfg.

Reasons

Currently isort's --profile=black is used only in CI, which means that you have to remember do the same locally (which I personally forgot). This can lead to situations where isort doesn't detect any problems locally (if profile is accidentally committed) but fails in CI.

Additionally, isort recommends pyproject.toml for storing configuration and setup.cfg is not used for anything else (other dev tool configs could be migrated as well).

@zero323
Copy link
Contributor Author

zero323 commented Dec 21, 2021

That's strange (and seems to be already an issue on master, when mypy==0.920 is used :(

pytest_mypy_plugins/collect.py:79: error: Item "None" of "Union[local, Any, None]" has no attribute "read_text"
pytest_mypy_plugins/item.py:350: error: Incompatible return value type (got "Tuple[Union[local, Any, None], None, str]", expected "Tuple[Union[local, str], Optional[int], str]")
Found 2 errors in 2 files (checked 8 source files)
Error: Process completed with exit code 1.

@zero323 zero323 mentioned this pull request Dec 21, 2021
@zero323 zero323 marked this pull request as draft December 21, 2021 14:10
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks!

@zero323 zero323 marked this pull request as ready for review December 21, 2021 15:19
@sobolevn sobolevn merged commit 2029a43 into typeddjango:master Dec 21, 2021
@zero323 zero323 deleted the isort-black-conf branch December 21, 2021 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants