From 88aa4b1c6bc73c074e1a9bc1272ea3a684389d08 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 20 Mar 2024 19:03:12 +0100 Subject: [PATCH 1/2] Format code with black==24.3.0 --- src/rhsmlib/services/register.py | 6 +++--- src/subscription_manager/branding/__init__.py | 1 - src/subscription_manager/repofile.py | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/rhsmlib/services/register.py b/src/rhsmlib/services/register.py index aa3d451844..76e1669088 100644 --- a/src/rhsmlib/services/register.py +++ b/src/rhsmlib/services/register.py @@ -144,9 +144,9 @@ def register( syspurposelib.write_syspurpose(syspurpose) syspurpose_dict = { - "service_level_agreement": consumer["serviceLevel"] - if "serviceLevel" in list(consumer.keys()) - else "", + "service_level_agreement": ( + consumer["serviceLevel"] if "serviceLevel" in list(consumer.keys()) else "" + ), "role": consumer["role"] if "role" in list(consumer.keys()) else "", "usage": consumer["usage"] if "usage" in list(consumer.keys()) else "", "addons": consumer["addOns"] if "addOns" in list(consumer.keys()) else [], diff --git a/src/subscription_manager/branding/__init__.py b/src/subscription_manager/branding/__init__.py index f435976ced..bd6db49591 100644 --- a/src/subscription_manager/branding/__init__.py +++ b/src/subscription_manager/branding/__init__.py @@ -67,7 +67,6 @@ def __getattr__(self, x): class DefaultBranding: - """ Default branding. values are defined in init to help with i18n/l10n ordering. diff --git a/src/subscription_manager/repofile.py b/src/subscription_manager/repofile.py index cc98803493..1d81524578 100644 --- a/src/subscription_manager/repofile.py +++ b/src/subscription_manager/repofile.py @@ -286,7 +286,6 @@ def manage_repos_enabled() -> bool: class TidyWriter: - """ ini file reader that removes successive newlines, and adds a trailing newline to the end of a file. From 6a8cef0e2d746f22f9452572962a28b2dcee6cf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 17:46:13 +0000 Subject: [PATCH 2/2] Bump black from 23.3.0 to 24.3.0 Bumps [black](https://github.com/psf/black) from 23.3.0 to 24.3.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.3.0...24.3.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:production ... [ Amended by Pino Toscano to also change the version of black in the CI workflow. ] Signed-off-by: dependabot[bot] Signed-off-by: Pino Toscano --- .github/workflows/stylish.yml | 2 +- test-requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stylish.yml b/.github/workflows/stylish.yml index 0d5ecdb040..434a304cb5 100644 --- a/.github/workflows/stylish.yml +++ b/.github/workflows/stylish.yml @@ -24,7 +24,7 @@ jobs: - uses: psf/black@stable with: - version: "23.3.0" + version: "24.3.0" - name: Setup flake8 annotations uses: rbialon/flake8-annotations@v1 diff --git a/test-requirements.txt b/test-requirements.txt index 2dfb62d967..c350c806c3 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ # the version of black is specified also in the stylish.yml github workflow; # please update the version there in case it is bumped here -black==23.3.0 +black==24.3.0 flake8 pytest pytest-randomly