-
Notifications
You must be signed in to change notification settings - Fork 55
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
fix support for black 22.1 #267
Conversation
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.60%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
@@ -104,7 +104,8 @@ def load_config(srcs: Iterable[str]) -> DarkerConfig: | |||
are used to look for the ``pyproject.toml`` configuration file. | |||
|
|||
""" | |||
path = find_project_root(tuple(srcs or ["."])) / "pyproject.toml" | |||
project_root = find_project_root(tuple(srcs or ["."]))[0] | |||
path = project_root / "pyproject.toml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use find_pyproject_toml
instead:
path = find_pyproject_toml(tuple(srcs or ["."]))
if path is not None:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if someone uses Darker with a Python code base which doesn't have pyproject.toml
?
As noted elsewhere, in #270 I took the approach of supporting both the old and the new Black behavior. |
No description provided.