From 0c80b67983273b4cc84737c478397b804f73fe28 Mon Sep 17 00:00:00 2001 From: BluThaitanium Date: Wed, 6 Jul 2022 23:16:13 -0400 Subject: [PATCH] enforce rule F821 for flake8 (undefined name) --- Makefile | 2 +- api/client/swagger_client/rest.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 172eff82..c83f3f0c 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ lint_python: venv ## Check Python code style compliance @which flake8 > /dev/null || pip install flake8 || pip3 install flake8 @flake8 . --show-source --statistics \ --select=E9,E2,E3,E5,F63,F7,F82,F4,F841,W291,W292 \ - --per-file-ignores ./*:F841,F821 \ + --per-file-ignores ./*:F841 \ --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,venv \ --max-line-length=140 @echo "$@: OK" diff --git a/api/client/swagger_client/rest.py b/api/client/swagger_client/rest.py index 0a2081cb..2ae713fc 100644 --- a/api/client/swagger_client/rest.py +++ b/api/client/swagger_client/rest.py @@ -152,8 +152,8 @@ def request( timeout = None if _request_timeout: if isinstance( - _request_timeout, (int,) if six.PY3 else (int, long) - ): # noqa: E501,F821 + _request_timeout, (int,) if six.PY3 else (int, long) # noqa: E501,F821 + ): timeout = urllib3.Timeout(total=_request_timeout) elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: timeout = urllib3.Timeout(