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

Compatibility with black-22.10.1.dev19+gffaaf48 #404

Merged
merged 2 commits into from
Nov 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Ignore type in gen_python_files compat hack
akaihola committed Nov 13, 2022
commit 8d8ad81410d8a6fbb67910d9790b24101320fd1b
6 changes: 3 additions & 3 deletions src/darker/black_diff.py
Original file line number Diff line number Diff line change
@@ -136,9 +136,9 @@ def filter_python_files(
# those two exist and are required in black>=21.7b1.dev9
kwargs = dict(verbose=False, quiet=False) if "verbose" in sig.parameters else {}
# `gitignore=` was replaced with `gitignore_dict=` in black==22.10.1.dev19+gffaaf48
kwargs.update(
{param: None for param in sig.parameters if param.startswith("gitignore")}
)
for param in sig.parameters:
if param.startswith("gitignore"):
kwargs[param] = None # type: ignore[assignment]
absolute_paths = {p.resolve() for p in paths}
directories = {p for p in absolute_paths if p.is_dir()}
files = {p for p in absolute_paths if p not in directories}