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

lint: reformat for black 2024 style #574

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ codeqa = [
"reuse",
]
formatters = [
"black",
"black>=24",
"isort",
]
test = [
Expand Down
6 changes: 3 additions & 3 deletions src/antsibull/build_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ def append_changelog_changes_ansible(

release_entries = changelog.generator.collect(
squash=True,
after_version=str(changelog_entry.prev_version)
if changelog_entry.prev_version
else None,
after_version=(
str(changelog_entry.prev_version) if changelog_entry.prev_version else None
),
until_version=changelog_entry.version_str,
)

Expand Down
15 changes: 9 additions & 6 deletions src/antsibull/python_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ def _package_data_new_method(self) -> None:
f"ansible_collections.{collection}.docs.*",
)
)
data = self["options.package_data"][
f"ansible_collections.{collection}"
] = IniList()
data = self["options.package_data"][f"ansible_collections.{collection}"] = (
IniList()
)

data.append("*")
for directory in collection_directories[collection]:
Expand All @@ -284,9 +284,12 @@ def generate(self) -> None:
)
self["metadata"].setdefault(
"project_urls",
NEW_URLS
if self.ansible_version >= MINIMUM_ANSIBLE_VERSIONS["BUILD_META_NEW_URLS"]
else OLD_URLS,
(
NEW_URLS
if self.ansible_version
>= MINIMUM_ANSIBLE_VERSIONS["BUILD_META_NEW_URLS"]
else OLD_URLS
),
)
self["options"].setdefault("install_requires", IniList()).append(
f"ansible-core ~= {self.ansible_core_version}"
Expand Down
12 changes: 8 additions & 4 deletions tests/verify_package_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,14 @@ def generate_package_files(
if force_generate_setup_cfg
else contextlib.nullcontext()
)
with cm, cm2, patch_object(
antsibull.build_ansible_commands,
"antsibull_version",
PLACEHOLDER_ANTSIBULL_VERSION,
with (
cm,
cm2,
patch_object(
antsibull.build_ansible_commands,
"antsibull_version",
PLACEHOLDER_ANTSIBULL_VERSION,
),
):
if r := antsibull_build.run(
[
Expand Down
Loading