From ba5bc274451d9148b9ec1cc875ef8af254b8053e Mon Sep 17 00:00:00 2001 From: Grant Ramsay Date: Sat, 17 Aug 2024 17:24:47 +0100 Subject: [PATCH] relax dependency version constraints (#335) * relax dependency version constraints * update pre-commit versions, ruff and fix linter warnings --- .pre-commit-config.yaml | 6 +++--- poetry.lock | 41 +++++++++++++++++++++-------------------- pyproject.toml | 34 +++++++++++++++++----------------- requirements-dev.txt | 2 +- tests/conftest.py | 8 ++++---- tests/test_changelog.py | 4 ++-- tests/test_cli.py | 2 +- tests/test_helpers.py | 2 +- 8 files changed, 50 insertions(+), 49 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95a25e4..74de83d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.9 + rev: v0.6.1 hooks: - id: ruff name: "lint with ruff" @@ -20,7 +20,7 @@ repos: name: "format with ruff" - repo: https://github.com/jackdewinter/pymarkdown - rev: v0.9.20 + rev: v0.9.22 hooks: - id: pymarkdown name: "check markdown" @@ -28,7 +28,7 @@ repos: args: [-d, "MD046", scan] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.10.0" # Use the sha / tag you want to point at + rev: "v1.11.1" # Use the sha / tag you want to point at hooks: - id: mypy name: "run mypy" diff --git a/poetry.lock b/poetry.lock index 9e87599..bdc37cb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "application-properties" @@ -1670,28 +1670,29 @@ files = [ [[package]] name = "ruff" -version = "0.4.9" +version = "0.6.1" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.4.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b262ed08d036ebe162123170b35703aaf9daffecb698cd367a8d585157732991"}, - {file = "ruff-0.4.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:98ec2775fd2d856dc405635e5ee4ff177920f2141b8e2d9eb5bd6efd50e80317"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4555056049d46d8a381f746680db1c46e67ac3b00d714606304077682832998e"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e91175fbe48f8a2174c9aad70438fe9cb0a5732c4159b2a10a3565fea2d94cde"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e8e7b95673f22e0efd3571fb5b0cf71a5eaaa3cc8a776584f3b2cc878e46bff"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:2d45ddc6d82e1190ea737341326ecbc9a61447ba331b0a8962869fcada758505"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:78de3fdb95c4af084087628132336772b1c5044f6e710739d440fc0bccf4d321"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:06b60f91bfa5514bb689b500a25ba48e897d18fea14dce14b48a0c40d1635893"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88bffe9c6a454bf8529f9ab9091c99490578a593cc9f9822b7fc065ee0712a06"}, - {file = "ruff-0.4.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:673bddb893f21ab47a8334c8e0ea7fd6598ecc8e698da75bcd12a7b9d0a3206e"}, - {file = "ruff-0.4.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8c1aff58c31948cc66d0b22951aa19edb5af0a3af40c936340cd32a8b1ab7438"}, - {file = "ruff-0.4.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:784d3ec9bd6493c3b720a0b76f741e6c2d7d44f6b2be87f5eef1ae8cc1d54c84"}, - {file = "ruff-0.4.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:732dd550bfa5d85af8c3c6cbc47ba5b67c6aed8a89e2f011b908fc88f87649db"}, - {file = "ruff-0.4.9-py3-none-win32.whl", hash = "sha256:8064590fd1a50dcf4909c268b0e7c2498253273309ad3d97e4a752bb9df4f521"}, - {file = "ruff-0.4.9-py3-none-win_amd64.whl", hash = "sha256:e0a22c4157e53d006530c902107c7f550b9233e9706313ab57b892d7197d8e52"}, - {file = "ruff-0.4.9-py3-none-win_arm64.whl", hash = "sha256:5d5460f789ccf4efd43f265a58538a2c24dbce15dbf560676e430375f20a8198"}, - {file = "ruff-0.4.9.tar.gz", hash = "sha256:f1cb0828ac9533ba0135d148d214e284711ede33640465e706772645483427e3"}, + {file = "ruff-0.6.1-py3-none-linux_armv6l.whl", hash = "sha256:b4bb7de6a24169dc023f992718a9417380301b0c2da0fe85919f47264fb8add9"}, + {file = "ruff-0.6.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:45efaae53b360c81043e311cdec8a7696420b3d3e8935202c2846e7a97d4edae"}, + {file = "ruff-0.6.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:bc60c7d71b732c8fa73cf995efc0c836a2fd8b9810e115be8babb24ae87e0850"}, + {file = "ruff-0.6.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c7477c3b9da822e2db0b4e0b59e61b8a23e87886e727b327e7dcaf06213c5cf"}, + {file = "ruff-0.6.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a0af7ab3f86e3dc9f157a928e08e26c4b40707d0612b01cd577cc84b8905cc9"}, + {file = "ruff-0.6.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:392688dbb50fecf1bf7126731c90c11a9df1c3a4cdc3f481b53e851da5634fa5"}, + {file = "ruff-0.6.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:5278d3e095ccc8c30430bcc9bc550f778790acc211865520f3041910a28d0024"}, + {file = "ruff-0.6.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fe6d5f65d6f276ee7a0fc50a0cecaccb362d30ef98a110f99cac1c7872df2f18"}, + {file = "ruff-0.6.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2e0dd11e2ae553ee5c92a81731d88a9883af8db7408db47fc81887c1f8b672e"}, + {file = "ruff-0.6.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d812615525a34ecfc07fd93f906ef5b93656be01dfae9a819e31caa6cfe758a1"}, + {file = "ruff-0.6.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:faaa4060f4064c3b7aaaa27328080c932fa142786f8142aff095b42b6a2eb631"}, + {file = "ruff-0.6.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:99d7ae0df47c62729d58765c593ea54c2546d5de213f2af2a19442d50a10cec9"}, + {file = "ruff-0.6.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9eb18dfd7b613eec000e3738b3f0e4398bf0153cb80bfa3e351b3c1c2f6d7b15"}, + {file = "ruff-0.6.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:c62bc04c6723a81e25e71715aa59489f15034d69bf641df88cb38bdc32fd1dbb"}, + {file = "ruff-0.6.1-py3-none-win32.whl", hash = "sha256:9fb4c4e8b83f19c9477a8745e56d2eeef07a7ff50b68a6998f7d9e2e3887bdc4"}, + {file = "ruff-0.6.1-py3-none-win_amd64.whl", hash = "sha256:c2ebfc8f51ef4aca05dad4552bbcf6fe8d1f75b2f6af546cc47cc1c1ca916b5b"}, + {file = "ruff-0.6.1-py3-none-win_arm64.whl", hash = "sha256:3bc81074971b0ffad1bd0c52284b22411f02a11a012082a76ac6da153536e014"}, + {file = "ruff-0.6.1.tar.gz", hash = "sha256:af3ffd8c6563acb8848d33cd19a69b9bfe943667f0419ca083f8ebe4224a3436"}, ] [[package]] @@ -2010,4 +2011,4 @@ test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-it [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "347a8fd9248ea8d506c7b72aa94eb60d986dc8f61ff2bc836233495828a58a32" +content-hash = "b8e77bfa6d02c0555770838cb229f5e58fa63b4c5d52d778a1500ca4f8103220" diff --git a/pyproject.toml b/pyproject.toml index b8fabb4..bc5e6c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ pygithub = ">=1.59.1,<3.0.0" rtoml = ">=0.9.0,<1.0.0" simple-toml-settings = ">=0.4.0,<1.0.0" typer = ">=0.9,<0.13" -rich = "^13.6.0" +rich = ">=13.6.0" [build-system] requires = ["poetry-core"] @@ -33,35 +33,35 @@ build-backend = "poetry.core.masonry.api" [tool.poetry.group.dev.dependencies] # linting, type-checking and security checks -pre-commit = "^3.3.3" -pymarkdownlnt = "^0.9.12" -mypy = "^1.4.1" -ruff = ">=0.1.1,<0.5.0" +pre-commit = ">=3.3.3" +pymarkdownlnt = ">=0.9.12" +mypy = ">=1.4.1" +ruff = ">=0.5.0" # task runner poethepoet = ">=0.27.0,<0.28.0" # testing faker = ">=19.2,<26.0" -mock = "^5.1.0" -pyfakefs = "^5.3.0" +mock = ">=5.1.0" +pyfakefs = ">=5.3.0" pytest = ">=7.4,<9.0" pytest-cov = ">=4,<6" -pytest-xdist = "^3.2.1" +pytest-xdist = ">=3.2.1" pytest-sugar = ">=0.9.7,<1.1.0" -pytest-randomly = "^3.13.0" -pytest-reverse = "^1.7.0" -pytest-asyncio = "^0.21.1" -pytest-mock = "^3.11.1" +pytest-randomly = ">=3.13.0" +pytest-reverse = ">=1.7.0" +pytest-asyncio = ">=0.21.1" +pytest-mock = ">=3.11.1" # documentation -mkdocs = "^1.4.3" +mkdocs = ">=1.4.3" mkdocs-autorefs = ">=0.5,<1.1" -mkdocs-material = "^9.1.19" +mkdocs-material = ">=9.1.19" mkdocs-minify-plugin = ">=0.7,<0.9" -mkdocs-git-revision-date-localized-plugin = "^1.2.0" -pymdown-extensions = "^10.1" -pygments = "^2.15.1" +mkdocs-git-revision-date-localized-plugin = ">=1.2.0" +pymdown-extensions = ">=10.1" +pygments = ">=2.15.1" [tool.poe.tasks] # setup PoeThePoet tasks diff --git a/requirements-dev.txt b/requirements-dev.txt index cf9611d..58a86b5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -74,7 +74,7 @@ regex==2023.10.3 ; python_version >= "3.9" and python_version < "4.0" requests==2.32.3 ; python_version >= "3.9" and python_version < "4.0" rich==13.7.1 ; python_version >= "3.9" and python_version < "4.0" rtoml==0.11.0 ; python_version >= "3.9" and python_version < "4.0" -ruff==0.4.9 ; python_version >= "3.9" and python_version < "4.0" +ruff==0.6.1 ; python_version >= "3.9" and python_version < "4.0" setuptools==70.0.0 ; python_version >= "3.9" and python_version < "4.0" shellingham==1.5.4 ; python_version >= "3.9" and python_version < "4.0" simple-toml-settings==0.6.1 ; python_version >= "3.9" and python_version < "4.0" diff --git a/tests/conftest.py b/tests/conftest.py index 75693e0..cba6a6d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,8 +6,8 @@ from github_changelog_md.constants import CONFIG_FILE -@pytest.fixture() -def config_file(fs) -> None: # noqa: PT004 +@pytest.fixture +def config_file(fs) -> None: """Create a fake config file.""" fs.create_file( CONFIG_FILE, @@ -23,8 +23,8 @@ def config_file(fs) -> None: # noqa: PT004 ) -@pytest.fixture() -def bad_schema(fs) -> None: # noqa: PT004 +@pytest.fixture +def bad_schema(fs) -> None: """Create a fake config file with a bad schema.""" fs.create_file( CONFIG_FILE, diff --git a/tests/test_changelog.py b/tests/test_changelog.py index 22a1809..1ed6a64 100644 --- a/tests/test_changelog.py +++ b/tests/test_changelog.py @@ -12,7 +12,7 @@ from github_changelog_md.constants import ExitErrors -@pytest.fixture() +@pytest.fixture def mock_repo_data(mocker) -> MagicMock: """Mock out the repo data object.""" mock_repo_data = MagicMock() @@ -34,7 +34,7 @@ def mock_repo_data(mocker) -> MagicMock: return mock_repo_data -@pytest.fixture() +@pytest.fixture def mock_repo() -> MagicMock: """Mock out the repo object.""" mock_repo = MagicMock() diff --git a/tests/test_cli.py b/tests/test_cli.py index 822b8d9..f21c925 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -15,7 +15,7 @@ from pytest_mock.plugin import MockType -@pytest.fixture() +@pytest.fixture def mock_changelog(mocker: MockerFixture) -> MockType: """Return a mocked ChangeLog class.""" return mocker.patch("github_changelog_md.main.ChangeLog") diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 1c9e9f8..acc01c8 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -25,7 +25,7 @@ from pytest_mock import MockerFixture -@pytest.fixture() +@pytest.fixture def sample_section_headings() -> list[SectionHeadings]: """Fixture for providing a sample list of section headings.""" return [