Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency sphinx to v6 #560

Merged
merged 3 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 42 additions & 41 deletions poetry.lock

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

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ flatten-dict = "*"
dpath = "*"
furl = "*"
StrEnum = "*"
# To avoid this error on python3.7: AttributeError: 'EntryPoints' object has no attribute 'get'
# https://importlib-metadata.readthedocs.io/en/latest/history.html#v5-0-0
importlib-metadata = {version = "<5.0", python = "<3.8"}

# TODO: chore: move to dependency groups once the feature is on a stable version of Poetry
# https://python-poetry.org/docs/master/managing-dependencies/#dependency-groups
Expand Down
30 changes: 18 additions & 12 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import os
from enum import Enum

import flake8
import pytest
import responses
from flake8.main import cli

Expand All @@ -20,18 +22,22 @@ def _call_main(argv, retv=0):
Copied from:
https://github.com/PyCQA/flake8/blame/5a85dd8ddb2dbd3027415594160c40e63b9b44e5/tests/integration/test_main.py#L13-L16
"""
# Since 5.0.0, flake8 is returning an exit code instead of raising SystemExit
# https://github.com/PyCQA/flake8/commit/81a4110338496714c0bf2bb0e8dd929461d9d492

# This change only affects nitpick's tests, not its code.
# No need to pin flake8 on pyproject.toml;
# nitpick uses a recent flake8 on poetry.lock
# but won't enforce the new version
# and will still work if the developer has an older flake8 version

# This is how flake8 tests the exit code nowadays:
# https://github.com/PyCQA/flake8/blob/45699b61ae4522864c60480c80d7c2ffb952d52e/tests/integration/test_main.py#L28
assert cli.main(argv) == retv
if flake8.__version_info__ < (5, 0, 0):
# Since 5.0.0, flake8 is returning an exit code instead of raising SystemExit
# https://github.com/PyCQA/flake8/commit/81a4110338496714c0bf2bb0e8dd929461d9d492

# This change only affects nitpick's tests, not its code.
# No need to pin flake8 on pyproject.toml;
# nitpick uses a recent flake8 on poetry.lock
# but won't enforce the new version
# and will still work if the developer has an older flake8 version
with pytest.raises(SystemExit) as excinfo:
cli.main(argv)
assert excinfo.value.code == retv
else:
# This is how flake8 tests the exit code nowadays:
# https://github.com/PyCQA/flake8/blob/45699b61ae4522864c60480c80d7c2ffb952d52e/tests/integration/test_main.py#L28
assert cli.main(argv) == retv


def test_absent_files(tmp_path):
Expand Down