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

Updates round 2 #1

Closed
wants to merge 6 commits into from
Closed

Conversation

matthewhughes934
Copy link
Owner

Second round of updates, split out to keep PRs reasonable size

  • Drop py dependency

    This package is in maintenance only mode and only had two uses. Replace
    their use with the tmp_path fixture as suggested in the docs[1]

    Link: https://docs.pytest.org/en/8.3.x/reference/reference.html#tmpdir [1]

  • Require Python >=3.8.1

    The motivation here is to bring in a new version of flake8, which has
    similar version constraints[1]. Python 3.8.0 is very old (and Python 3.8
    is EoL anyway)

    Link: PyCQA/flake8@aa002ee [1]

  • Update pytest

    There was one new error:

      TypeError: exceptions must be derived from Warning, not <class 'NoneType'>
    

    Fix this following the docs[1]

    Link: https://docs.pytest.org/en/8.3.x/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests [1]

  • Update black

    Also some fixes for 5b74aba

    • loosen the version constraint
    • restore the --check flag to the lint script
  • Update flake8

    This required fixes an error in the config (I also updated the relevant
    link, the old one would 404):

      ValueError: Error code '#' supplied to 'extend-ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'
    

    And some errors in the code:

      isort/literal.py:59:8: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
      tests/unit/test_isort.py:13:1: F401 'typing.Dict' imported but unused
    

    The second test conflicted with mypy, since Dict was only used in
    commented annotations, to make them both happy move one of these
    annotations out of a comment (in the future we should probably move all
    such annotations out of comments)

  • Update hypothesis

    This required addressing some errors from mypy:

      tests/integration/test_setting_combinations.py:20: error: "SearchStrategy" expects no type arguments, but 1 given  [type-arg]
      tests/integration/test_hypothesmith.py:36: error: "SearchStrategy" expects no type arguments, but 1 given  [type-arg]
    

DanielNoord and others added 3 commits January 10, 2025 15:33
This package is in maintenance only mode and only had two uses. Replace
their use with the `tmp_path` fixture as suggested in the docs[1]

Link: https://docs.pytest.org/en/8.3.x/reference/reference.html#tmpdir [1]
There was one new error:

    TypeError: exceptions must be derived from Warning, not <class 'NoneType'>

Fix this following the docs[1]

Link: https://docs.pytest.org/en/8.3.x/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests [1]
This required fixes an error in the config (I also updated the relevant
link, the old one would 404):

    ValueError: Error code '#' supplied to 'extend-ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'

And some errors in the code:

    isort/literal.py:59:8: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
    tests/unit/test_isort.py:13:1: F401 'typing.Dict' imported but unused

The second test conflicted with `mypy`, since `Dict` was only used in
commented annotations, to make them both happy move one of these
annotations out of a comment (in the future we should probably move all
such annotations out of comments)
This required addressing some errors from `mypy`:

    tests/integration/test_setting_combinations.py:20: error: "SearchStrategy" expects no type arguments, but 1 given  [type-arg]
    tests/integration/test_hypothesmith.py:36: error: "SearchStrategy" expects no type arguments, but 1 given  [type-arg]
matthewhughes934 pushed a commit that referenced this pull request Jan 17, 2025
use `stdlibs` for stdlibs packages list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants