From 95f4b5c0b8be3919962f5c105dea44acfee3dccb Mon Sep 17 00:00:00 2001 From: SkalskiP Date: Fri, 10 Nov 2023 10:25:59 -0800 Subject: [PATCH] Add linting rule exceptions for test_file.py Added linting rule exceptions for 'test/utils/test_file.py' in 'pyproject.toml'. Specifically, the 'W291' error which checks for trailing whitespace is ignored for this test file. This is necessary to test whether 'read_txt_file' function in 'test_utils.py' correctly ignores trailing whitespaces in varies test scenarios. --- pyproject.toml | 2 ++ test/utils/test_file.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f0684344..9dc69b6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,6 +82,7 @@ extend-ignore = """ per-file-ignores = """ __init__.py: F401 supervision/assets/list.py: E501 + test/utils/test_file.py: W291 """ [tool.isort] @@ -172,6 +173,7 @@ convention = "google" [tool.ruff.per-file-ignores] "__init__.py" = ["E402","F401"] "supervision/assets/list.py" = ["E501"] +"test/utils/test_file.py" = ["W291"] [tool.ruff.pylint] max-args = 20 diff --git a/test/utils/test_file.py b/test/utils/test_file.py index 681665c8..0d544aa9 100644 --- a/test/utils/test_file.py +++ b/test/utils/test_file.py @@ -11,7 +11,7 @@ Line 2 Line 3 """ -FILE_2_CONTENT = """ +FILE_2_CONTENT = """ Line 2 Line 4