From: garciadeblas Date: Mon, 29 Jan 2024 15:28:37 +0000 (+0100) Subject: Pin black, flake and pylint versions in tox.ini X-Git-Tag: release-v16.0-start~17 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=545da4cebb74ce03bb874aed39e2ae18c2c972b3;p=osm%2Fosmclient.git Pin black, flake and pylint versions in tox.ini Change-Id: Ibc788448bf70586f1cc75078333552d5559d3a36 Signed-off-by: garciadeblas --- diff --git a/osmclient/cli_commands/rbac.py b/osmclient/cli_commands/rbac.py index 4e1680d..71fa12b 100755 --- a/osmclient/cli_commands/rbac.py +++ b/osmclient/cli_commands/rbac.py @@ -294,9 +294,9 @@ def project_update(ctx, project, name, quotas): "--projects", # prompt="Comma separate list of projects", multiple=True, - callback=lambda ctx, param, value: "".join(value).split(",") - if all(len(x) == 1 for x in value) - else value, + callback=lambda ctx, param, value: ( + "".join(value).split(",") if all(len(x) == 1 for x in value) else value + ), help="list of project ids that the user belongs to", ) @click.option( @@ -470,12 +470,14 @@ def user_list(ctx, filter): user["username"], user["_id"], user["_admin"]["user_status"].upper(), - time.strftime( - "%b-%d-%Y %X", - time.gmtime(user["_admin"]["account_expire_time"]), - ) - if not user["username"] == "admin" - else user["_admin"]["account_expire_time"], + ( + time.strftime( + "%b-%d-%Y %X", + time.gmtime(user["_admin"]["account_expire_time"]), + ) + if not user["username"] == "admin" + else user["_admin"]["account_expire_time"] + ), ] ) else: diff --git a/osmclient/common/sol004_package.py b/osmclient/common/sol004_package.py index b585bc4..fe480fc 100644 --- a/osmclient/common/sol004_package.py +++ b/osmclient/common/sol004_package.py @@ -103,9 +103,9 @@ class SOL004Package(SOLPackage): self._manifest_metadata[self._MANIFEST_VNFD_PROVIDER_ID] = vnfd_data.get( "provider", "OSM" ) - self._manifest_metadata[ - self._MANIFEST_VNFD_SOFTWARE_VERSION - ] = vnfd_data.get("version", "1.0") + self._manifest_metadata[self._MANIFEST_VNFD_SOFTWARE_VERSION] = ( + vnfd_data.get("version", "1.0") + ) self._manifest_metadata[self._MANIFEST_VNFD_PACKAGE_VERSION] = "1.0.0" self._manifest_metadata[self._MANIFEST_VNFD_RELEASE_DATE_TIME] = ( datetime.datetime.now().astimezone().isoformat() diff --git a/osmclient/common/sol007_package.py b/osmclient/common/sol007_package.py index 3c1df3a..6237f8c 100644 --- a/osmclient/common/sol007_package.py +++ b/osmclient/common/sol007_package.py @@ -99,9 +99,9 @@ class SOL007Package(SOLPackage): self._manifest_metadata[self._MANIFEST_NSD_DESIGNER] = nsd_data.get( "designer", "OSM" ) - self._manifest_metadata[ - self._MANIFEST_NSD_FILE_STRUCTURE_VERSION - ] = nsd_data.get("version", "1.0") + self._manifest_metadata[self._MANIFEST_NSD_FILE_STRUCTURE_VERSION] = ( + nsd_data.get("version", "1.0") + ) self._manifest_metadata[self._MANIFEST_NSD_RELEASE_DATE_TIME] = ( datetime.datetime.now().astimezone().isoformat() ) diff --git a/osmclient/sol005/osmrepo.py b/osmclient/sol005/osmrepo.py index 6b9d527..add5c18 100644 --- a/osmclient/sol005/osmrepo.py +++ b/osmclient/sol005/osmrepo.py @@ -531,9 +531,9 @@ class OSMRepo(Repo): index["{}_packages".format(package_type)][fields.get("id")] = { fields.get("version"): data_ind } - index["{}_packages".format(package_type)][fields.get("id")][ - "latest" - ] = fields.get("version") + index["{}_packages".format(package_type)][fields.get("id")]["latest"] = ( + fields.get("version") + ) yaml.safe_dump( index, open(join(destination, "index.yaml"), "w"), diff --git a/tox.ini b/tox.ini index e1560bb..f822051 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,7 @@ parallel_show_output = true ####################################################################################### [testenv:black] -deps = black +deps = black==24.1.1 skip_install = true commands = black --check --diff osmclient/ @@ -54,7 +54,7 @@ allowlist_externals = sh ####################################################################################### [testenv:flake8] -deps = flake8 +deps = flake8==7.0.0 commands = flake8 osmclient/ setup.py @@ -64,7 +64,7 @@ commands = deps = {[testenv]deps} -r{toxinidir}/requirements-dev.txt -r{toxinidir}/requirements-test.txt - pylint + pylint==3.0.3 commands = pylint -E osmclient/