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

Dependency updates round 1 #2325

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

matthewhughes934
Copy link
Contributor

First round of upstreaming some improvements, mostly around
dependencies, from https://github.com/matthewhughes934/isort-fork

  • Update typing for setuptools

    The inspiration for this change was the following warning from poetry:

      Warning: The locked version 0.1.3 for types-pkg-resources is a yanked
      version. Reason for being yanked: Use types-setuptools instead
    

    Following that, adding types-setuptools allowed the removal of some
    type: ignore comments, which then lead to a single issue needing to be
    fixed:

      tests/unit/test_setuptools_command.py:8: error: Argument 1 to "ISortCommand" has incompatible type "distutils.dist.Distribution"; expected "setuptools.dist.Distribution"  [arg-type]
    
  • Remove some flake8 exceptions

    Mostly as a matter of consistency. For isort/__init__.py this
    exception looks to not be needed since
    be0fbd0

    An exception is kept in pace for an example file in tests as the
    contents of the file are just for testing.

  • Restore setuptools as optional dependency

    This looks to have been accidentally removed with
    f7a6b0e, setuptools is still required
    in isort.setuptools_commands

  • Drop some unused dependencies

    • ipython was removed with 49b41a5
    • smmap2 looking at the history with git log -G smmap --name-only --oneline suggests this was only ever defined in
      poetry.lock/pyproject.toml. Given this is a library and not
      providing something extra like e.g. a flake8 plugin it should be
      safe to remove

The inspiration for this change was the following warning from `poetry`:

    Warning: The locked version 0.1.3 for types-pkg-resources is a yanked
    version. Reason for being yanked: Use types-setuptools instead

Following that, adding `types-setuptools` allowed the removal of some
`type: ignore` comments, which then lead to a single issue needing to be
fixed:

    tests/unit/test_setuptools_command.py:8: error: Argument 1 to "ISortCommand" has incompatible type "distutils.dist.Distribution"; expected "setuptools.dist.Distribution"  [arg-type]
Mostly as a matter of consistency. For `isort/__init__.py` this
exception looks to not be needed since
be0fbd0

An exception is kept in pace for an example file in tests as the
contents of the file are just for testing.
This looks to have been accidentally removed with
f7a6b0e, `setuptools` is still required
in `isort.setuptools_commands`
* `ipython` was removed with 49b41a5
* `smmap2` looking at the history with `git log -G smmap --name-only
  --oneline` suggests this was only ever defined in
  `poetry.lock`/`pyproject.toml`. Given this is a library and not
  providing something extra like e.g. a `flake8` plugin it should be
  safe to remove
@matthewhughes934 matthewhughes934 marked this pull request as ready for review January 9, 2025 16:57
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.12%. Comparing base (4eeb37a) to head (b30c9b1).
Report is 31 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2325      +/-   ##
==========================================
- Coverage   99.15%   99.12%   -0.04%     
==========================================
  Files          39       39              
  Lines        3091     3097       +6     
  Branches      748      787      +39     
==========================================
+ Hits         3065     3070       +5     
  Misses         15       15              
- Partials       11       12       +1     

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.

1 participant