From: garciadeblas Date: Tue, 28 Mar 2023 20:02:48 +0000 (+0200) Subject: Fix black and cover errors X-Git-Tag: v13.0.1^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=418b29773f44b656631082cc975ee8dd22e54473;p=osm%2Fosmclient.git Fix black and cover errors Change-Id: I1609f37b3403b09ccf408715d712a646f650775b Signed-off-by: garciadeblas --- diff --git a/osmclient/cli_commands/pdus.py b/osmclient/cli_commands/pdus.py index 3ce5572..b1fc768 100755 --- a/osmclient/cli_commands/pdus.py +++ b/osmclient/cli_commands/pdus.py @@ -175,7 +175,6 @@ def pdu_update( def create_pdu_dictionary( name, pdu_type, interface, description, vim_account, descriptor_file, update=False ): - logger.debug("") pdu = {} diff --git a/osmclient/common/http.py b/osmclient/common/http.py index 433edd0..9207cbc 100644 --- a/osmclient/common/http.py +++ b/osmclient/common/http.py @@ -42,7 +42,6 @@ class Http(object): return curl_cmd def get_cmd(self, endpoint): - data = BytesIO() curl_cmd = self._get_curl_cmd(endpoint) curl_cmd.setopt(pycurl.HTTPGET, 1) diff --git a/osmclient/sol005/client.py b/osmclient/sol005/client.py index a69f3cc..4f15fc5 100644 --- a/osmclient/sol005/client.py +++ b/osmclient/sol005/client.py @@ -55,7 +55,6 @@ class Client(object): project="admin", **kwargs ): - self._user = user self._password = password self._project = project diff --git a/osmclient/sol005/nsi.py b/osmclient/sol005/nsi.py index 999959e..6efce4b 100644 --- a/osmclient/sol005/nsi.py +++ b/osmclient/sol005/nsi.py @@ -145,7 +145,6 @@ class Nsi(object): admin_status="ENABLED", wait=False, ): - self._logger.debug("") self._client.get_token() nst = self._client.nst.get(nst_name) diff --git a/osmclient/sol005/osmrepo.py b/osmclient/sol005/osmrepo.py index 0e6bb46..6b9d527 100644 --- a/osmclient/sol005/osmrepo.py +++ b/osmclient/sol005/osmrepo.py @@ -147,7 +147,6 @@ class OSMRepo(Repo): return f_name def pkg_get(self, pkgtype, name, repo, version, filter): - pkg_name = self.get_pkg(pkgtype, name, repo, filter, version) if not pkg_name: raise ClientException("Package not found") diff --git a/osmclient/sol005/user.py b/osmclient/sol005/user.py index 917fb1a..d94b9c4 100644 --- a/osmclient/sol005/user.py +++ b/osmclient/sol005/user.py @@ -111,7 +111,6 @@ class User(object): if user.get("set-project"): # Remove project and insert project role mapping for set_project in user["set-project"]: - set_project_clean = [m.strip() for m in set_project.split(",")] project, roles = set_project_clean[0], set_project_clean[1:] diff --git a/tox.ini b/tox.ini index eea8257..8a2fc0d 100644 --- a/tox.ini +++ b/tox.ini @@ -49,7 +49,7 @@ commands = coverage report --omit='*tests*' coverage html -d ./cover --omit='*tests*' coverage xml -o coverage.xml --omit=*tests* -whitelist_externals = sh +allowlist_externals = sh ####################################################################################### @@ -84,7 +84,7 @@ commands = [testenv:pip-compile] deps = pip-tools==6.6.2 skip_install = true -whitelist_externals = bash +allowlist_externals = bash [ commands = - bash -c "for file in requirements*.in ; do \ @@ -108,7 +108,7 @@ commands = python3 setup.py --command-packages=stdeb.command sdist_dsc sh -c 'cd deb_dist/osmclient*/ && dpkg-buildpackage -rfakeroot -uc -us' sh -c 'rm osmclient/requirements.txt' -whitelist_externals = sh +allowlist_externals = sh ####################################################################################### [flake8]