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

Dropping isort and move to lint.isort rule in ruff #5712

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tkoyama010
Copy link
Member

Overview

Dropping isort and moving to lint.isort rule in ruff.

Details

@github-actions github-actions bot added maintenance Low-impact maintenance activity dependencies Pull requests that update a dependency file labels Feb 29, 2024
@tkoyama010
Copy link
Member Author

pre-commit.ci autofix

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.55%. Comparing base (e338c17) to head (c12bfc7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5712   +/-   ##
=======================================
  Coverage   96.55%   96.55%           
=======================================
  Files         137      137           
  Lines       23395    23395           
=======================================
  Hits        22589    22589           
  Misses        806      806           

@user27182
Copy link
Contributor

I'm not sure how much overlap this tool has with isort, but this seems worth considering :

https://github.com/asottile/reorder-python-imports

Its main goal is to reduce merge conflicts.

@tkoyama010 tkoyama010 marked this pull request as draft March 1, 2024 08:47
@user27182
Copy link
Contributor

I'm not sure how much overlap this tool has with isort, but this seems worth considering :

https://github.com/asottile/reorder-python-imports

Its main goal is to reduce merge conflicts.

For context, I stumbled upon reorder-python-imports trying to look for a solution to #5621 (comment) . In this case, reorder-python-imports could be used to automatically add from future import __annotations__ to every file in the code base to support the type aliases for the docs. The config would be similar to this: https://github.com/asottile/pyupgrade/blob/df17dfa3911b81b4a27190b0eea5b1debc7ffa0a/.pre-commit-config.yaml#L18-L20

I plan on opening a new PR with reorder-python-imports to support this. And so if this works and the PR is accepted, then perhaps we may want to also use reorder-python-imports instead of isort. Just an idea though, I am not very familiar with these linting tools.

@tkoyama010
Copy link
Member Author

Just an idea though, I am not very familiar with these linting tools.

No problem. We will review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file maintenance Low-impact maintenance activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants