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

Add black config to pyproject.toml #3493

Merged

Conversation

@jack1142
Copy link
Member

jack1142 commented Feb 3, 2020

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

A simple change that makes it possible to just run black . in repo's folder without bothering with wrong settings. It resembles the flags used in our Makefile/make.bat.
Also added the excludes that are used by default in black so that we can simply add new ones if needed in future.
We could technically also modify make files so that we just rely on config in pyproject.toml but I left it as is for now.

@jack1142 jack1142 requested a review from Twentysix26 as a code owner Feb 3, 2020
@jack1142 jack1142 force-pushed the jack1142:V3/black_pyproject_toml branch from 29d5837 to bda1b08 Feb 3, 2020
@jack1142

This comment has been minimized.

Copy link
Member Author

jack1142 commented Feb 3, 2020

Ready for review I suppose :P

Copy link
Member

Drapersniper left a comment

Can we make the make files and style check use these please so that all configs are in 1 place?

@jack1142

This comment has been minimized.

Copy link
Member Author

jack1142 commented Feb 3, 2020

Modified make files to only specify files black should run on so that it uses settings from pyproject.toml for rest. I left usage of git ls-files *.py as it could technically have different behaviour than the settings in pyproject.toml but I can change that as well if it's fine.

jack1142 added 3 commits Feb 3, 2020
@jack1142 jack1142 force-pushed the jack1142:V3/black_pyproject_toml branch from a95e6e0 to 2c14e97 Feb 5, 2020
@mikeshardmind mikeshardmind added this to the 3.3.2 milestone Feb 8, 2020
@mikeshardmind mikeshardmind merged commit 84870f2 into Cog-Creators:V3/develop Feb 8, 2020
5 checks passed
5 checks passed
Lint Python
Details
Tox - Tests
Details
Tox - Style
Details
Tox - Docs
Details
Tox - Postgres (3.8)
Details
@jack1142 jack1142 deleted the jack1142:V3/black_pyproject_toml branch Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.