diff --git a/appmap/__init__.py b/appmap/__init__.py index 65e38973..a9fc2d35 100644 --- a/appmap/__init__.py +++ b/appmap/__init__.py @@ -4,7 +4,7 @@ from _appmap.env import Env # noqa: F401 from _appmap.importer import instrument_module # noqa: F401 from _appmap.labels import labels # noqa: F401 -from _appmap.noappmap import decorator as noappmap +from _appmap.noappmap import decorator as noappmap # noqa: F401 from _appmap.recording import Recording # noqa: F401 try: diff --git a/appmap/http.py b/appmap/http.py index 3e5c4273..81d9fc9a 100644 --- a/appmap/http.py +++ b/appmap/http.py @@ -52,7 +52,7 @@ def putheader(self, orig, header, *values): if not hasattr(request, "headers"): request["headers"] = {} headers = request["headers"] - if not header in headers: + if header not in headers: headers[header] = [] headers[header].extend(values) orig(self, header, *values) diff --git a/appmap/labeling/__init__.py b/appmap/labeling/__init__.py index 2d80994d..73b64571 100644 --- a/appmap/labeling/__init__.py +++ b/appmap/labeling/__init__.py @@ -8,7 +8,7 @@ import yaml from importlib_resources import files -from _appmap.labels import LabelSet +from _appmap.labels import LabelSet # noqa: F401 @lru_cache(maxsize=None) diff --git a/appmap/pytest.py b/appmap/pytest.py index 6a1d3f13..3c3d54e6 100644 --- a/appmap/pytest.py +++ b/appmap/pytest.py @@ -80,5 +80,5 @@ def pytest_pyfunc_call(pyfuncitem): try: with testing_framework.collect_result_metadata(metadata): result.get_result() - except: # pylint: disable=bare-except + except: # pylint: disable=bare-except # noqa: E722 pass # exception got recorded in metadata diff --git a/appmap/unittest.py b/appmap/unittest.py index 368b3089..c5af286d 100644 --- a/appmap/unittest.py +++ b/appmap/unittest.py @@ -4,4 +4,4 @@ if not Env.current.is_appmap_repo and Env.current.enables("unittest"): logger.debug("Test recording is enabled (unittest)") - import _appmap.unittest # pyright: ignore pylint: disable=unused-import + import _appmap.unittest # pyright: ignore pylint: disable=unused-import # noqa: F401 diff --git a/pyproject.toml b/pyproject.toml index 27a3f1ed..b0dc8117 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,7 @@ uvicorn = "^0.27.1" fastapi = "^0.110.0" httpx = "^0.27.0" pytest-env = "^1.1.3" +ruff = "^0.3.3" [build-system] requires = ["poetry-core>=1.1.0"]