From 1d7ff57ed0fa93405727777955c2ac45fe036042 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Feb 2024 02:38:35 +0000 Subject: [PATCH 1/2] Bump ruff from 0.1.15 to 0.2.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.15 to 0.2.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.15...v0.2.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index eb5ac4b..58fe289 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ -ruff==0.1.15 +ruff==0.2.0 mypy pyenchant pylint From dbfdb8d8a0d975f3cee6f4524c10334a8b7d380f Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Feb 2024 04:53:20 +0000 Subject: [PATCH 2/2] Avoid all warnings from ruff --- pip_check_reqs/find_extra_reqs.py | 2 +- pip_check_reqs/find_missing_reqs.py | 2 +- pyproject.toml | 5 +++-- tests/test_find_extra_reqs.py | 4 ++-- tests/test_find_missing_reqs.py | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pip_check_reqs/find_extra_reqs.py b/pip_check_reqs/find_extra_reqs.py index 371885f..45aa313 100644 --- a/pip_check_reqs/find_extra_reqs.py +++ b/pip_check_reqs/find_extra_reqs.py @@ -226,7 +226,7 @@ def main(arguments: list[str] | None = None) -> None: elif parse_result.verbose: level = logging.INFO else: - level = logging.WARN + level = logging.WARNING log.setLevel(level) common.log.setLevel(level) diff --git a/pip_check_reqs/find_missing_reqs.py b/pip_check_reqs/find_missing_reqs.py index 7363216..54aaa16 100644 --- a/pip_check_reqs/find_missing_reqs.py +++ b/pip_check_reqs/find_missing_reqs.py @@ -209,7 +209,7 @@ def main(arguments: list[str] | None = None) -> None: elif parse_result.verbose: level = logging.INFO else: - level = logging.WARN + level = logging.WARNING log.setLevel(level) common.log.setLevel(level) diff --git a/pyproject.toml b/pyproject.toml index 2ef20ef..9e315e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,8 +92,11 @@ strict = true [tool.ruff] +line-length = 79 target-version = "py39" +[tool.ruff.lint] + select = ["ALL"] ignore = [ @@ -115,8 +118,6 @@ ignore = [ "S101", ] -line-length = 79 - # Do not automatically remove commented out code. # We comment out code during development, and with VSCode auto-save, this code # is sometimes annoyingly removed. diff --git a/tests/test_find_extra_reqs.py b/tests/test_find_extra_reqs.py index 20c96ff..3232226 100644 --- a/tests/test_find_extra_reqs.py +++ b/tests/test_find_extra_reqs.py @@ -69,7 +69,7 @@ def test_main_failure( source_dir = tmp_path / "source" source_dir.mkdir() - caplog.set_level(logging.WARN) + caplog.set_level(logging.WARNING) with pytest.raises(SystemExit) as excinfo: find_extra_reqs.main( @@ -130,7 +130,7 @@ def test_logging_config( for event in [ (logging.DEBUG, "debug"), (logging.INFO, "info"), - (logging.WARN, "warn"), + (logging.WARNING, "warn"), ]: find_extra_reqs.log.log(*event) diff --git a/tests/test_find_missing_reqs.py b/tests/test_find_missing_reqs.py index 7644c21..28c6067 100644 --- a/tests/test_find_missing_reqs.py +++ b/tests/test_find_missing_reqs.py @@ -79,7 +79,7 @@ def test_main_failure( # We choose `pytest` because we know it is installed. source_file.write_text("import pytest") - caplog.set_level(logging.WARN) + caplog.set_level(logging.WARNING) with pytest.raises(SystemExit) as excinfo: find_missing_reqs.main( @@ -140,7 +140,7 @@ def test_logging_config( for event in [ (logging.DEBUG, "debug"), (logging.INFO, "info"), - (logging.WARN, "warn"), + (logging.WARNING, "warn"), ]: find_missing_reqs.log.log(*event)