From e425268672d1f5b8575e5182c1082d5eccf4008a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 04:00:22 +0000 Subject: [PATCH 1/4] build(deps-dev): update reuse requirement from ~=2.1 to ~=3.0 Updates the requirements on [reuse](https://github.com/fsfe/reuse-tool) to permit the latest version. - [Release notes](https://github.com/fsfe/reuse-tool/releases) - [Changelog](https://github.com/fsfe/reuse-tool/blob/main/CHANGELOG.md) - [Commits](https://github.com/fsfe/reuse-tool/compare/v2.1.0...v3.0.0) --- updated-dependencies: - dependency-name: reuse dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 533ea670..9162fdfd 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -35,4 +35,4 @@ pytest-socket ~= 0.6 pytest-sugar ~= 0.9 pytest-tldr ~= 0.2 twine ~= 4.0 -reuse ~= 2.1 +reuse ~= 3.0 From a66614107c9ef5c96114183a50099c06f48a9752 Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Thu, 18 Jan 2024 07:21:10 +0100 Subject: [PATCH 2/4] requirements-dev: bump flake8-bugbear to ~24.1 Signed-off-by: Konrad Weihmann --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 9162fdfd..2f0a3131 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,7 @@ flake8 ~= 7.0 flake8-2020 ~= 1.8 flake8-bandit ~= 4.1 flake8-broken-line ~= 1.0 -flake8-bugbear ~= 23.12 +flake8-bugbear ~= 24.1 flake8-builtins ~= 2.2 flake8-coding ~= 1.3 flake8-commas ~= 2.1 From f0b78350246a4e2d0c427dfc54737a9c2a811b01 Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Thu, 18 Jan 2024 07:21:52 +0100 Subject: [PATCH 3/4] compatibility: init shall not return anything Signed-off-by: Konrad Weihmann --- flict/flictlib/compatibility.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flict/flictlib/compatibility.py b/flict/flictlib/compatibility.py index b5c62b4a..934987fe 100644 --- a/flict/flictlib/compatibility.py +++ b/flict/flictlib/compatibility.py @@ -46,7 +46,7 @@ class Compatibility: """ def __init__(self, license_db=None): - return None + pass def check_compat(self, outbound, inbound): return None @@ -76,7 +76,7 @@ def display_compatibility(self): licenses = list(_licenses) inter_compats = self.check_compatibilities(licenses, self._args.extended_licenses) - except BaseException: + except Exception: raise FlictError(ReturnCodes.RET_INVALID_EXPRESSSION, f'Could not parse license expression: {self._args.license_expression}') From bd95fa6ad05a8ca93ba99476ee7d94fbc1e4171b Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Thu, 18 Jan 2024 07:22:28 +0100 Subject: [PATCH 4/4] license_parser: switch to Exception from BaseException as mentioned by latest flake8-bugbear installation Signed-off-by: Konrad Weihmann --- flict/flictlib/license_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flict/flictlib/license_parser.py b/flict/flictlib/license_parser.py index f6a26d1a..fecd041d 100644 --- a/flict/flictlib/license_parser.py +++ b/flict/flictlib/license_parser.py @@ -179,7 +179,7 @@ def licenses(self, expr): for key in keys: key_set.add(key.replace("_WITH_", " WITH ")) return list(key_set) - except BaseException: + except Exception: raise FlictError(ReturnCodes.RET_INVALID_EXPRESSSION, f"Could not parse and list license expression: {expr}")