Skip to content

Commit

Permalink
relax dependency version constraints (#335)
Browse files Browse the repository at this point in the history
* relax dependency version constraints
* update pre-commit versions, ruff and fix linter warnings
  • Loading branch information
seapagan authored Aug 17, 2024
1 parent db8fd1b commit ba5bc27
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 49 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ 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"
- id: ruff-format
name: "format with ruff"

- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.20
rev: v0.9.22
hooks:
- id: pymarkdown
name: "check markdown"
exclude: ^.github/|CHANGELOG
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"
Expand Down
41 changes: 21 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,43 @@ 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"]
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
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down

0 comments on commit ba5bc27

Please sign in to comment.