First time here? Check out the FAQ!

heyman's profile - activity

2022-02-11 16:01:43 -0500 received badge Famous Question (source)
2020-12-15 11:03:30 -0500 received badge Notable Question (source)
2020-12-11 06:43:17 -0500 received badge Popular Question (source)
2020-12-11 04:13:08 -0500 commented answer Auto-reformatting using Black doesn't use config in pyproject.toml

Also, I think it makes much more sense to read the line-length from the pyproject.toml if one is declared there.

2020-12-11 04:07:47 -0500 commented answer Auto-reformatting using Black doesn't use config in pyproject.toml

For example, I'd like to add only the project directory to the included directories, so that if I edit a file outside of

2020-12-11 04:03:37 -0500 commented answer Auto-reformatting using Black doesn't use config in pyproject.toml

The option I'm currently looking to specify - apart from line length, that is already possible to set like you pointed o

2020-12-08 05:02:51 -0500 commented answer Auto-reformatting using Black doesn't use config in pyproject.toml

Thanks for the tip! How about other Black configuration settings?

2020-12-07 09:59:57 -0500 marked best answer Auto-reformatting using Black doesn't use config in pyproject.toml

Hi!

I have configured the line-length for Black in a pyproject.toml:

[tool.black]
line-length = 120

When I manually run python -m black some/project/file.py this is respected. However when I turn on auto reformatting using Black (set to "Whole Files Before Save") the specified line-length doesn't seem to be respected, and that results in a different output that what is produced by running python -m black some/project/file.py manually.

I suspect that Black might be invoked using the -c or --code flag with the whole file source being passed into it. That could explain why the issue happens, since Black won't know where to look for the config file.

Is this possible to fix somehow, or is it possible to add custom command line flags to the black command that WingPro executes (that I could use to manually add a --config flag)?

2020-12-04 10:50:46 -0500 received badge Student (source)
2020-12-04 07:59:06 -0500 asked a question Auto-reformatting using Black doesn't use config in pyproject.toml

Auto-reformatting using Black doesn't use config in pyproject.toml Hi! I have configured the line-length for Black in a