Skip to content

Make 'isort' consistent about 'build' - #2197

Merged
webknjaz merged 1 commit into
jazzband:mainfrom
sirosen:make-isort-consistent-about-build
Jun 26, 2025
Merged

Make 'isort' consistent about 'build'#2197
webknjaz merged 1 commit into
jazzband:mainfrom
sirosen:make-isort-consistent-about-build

Conversation

@sirosen

@sirosen sirosen commented Jun 26, 2025

Copy link
Copy Markdown
Member

This does not seem to reproduce consistently -- isort is executing
correctly in pre-commit.ci -- but in some environments and
invocations, isort is incorrectly reordering imports of build
because it gets confused by the piptools.build module.

Contributor checklist
  • Included tests for the changes.
  • PR title is short, clear, and ready to be included in the user-facing changelog.
Maintainer checklist
  • Verified one of these labels is present: backwards incompatible, feature, enhancement, deprecation, bug, dependency, docs or skip-changelog as they determine changelog listing.
  • Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

This does not seem to reproduce consistently -- `isort` is executing
correctly in pre-commit.ci -- but in some environments and
invocations, `isort` is incorrectly reordering imports of `build`
because it gets confused by the `piptools.build` module.
@sirosen sirosen added skip-changelog Avoid listing in changelog maintenance Related to maintenance processes labels Jun 26, 2025
@WhyNotHugo

WhyNotHugo commented Jun 26, 2025

Copy link
Copy Markdown
Member

We could also just use ruff for managing imports. See: #1886

@WhyNotHugo

Copy link
Copy Markdown
Member

(it's probably best to merge this as a short-term fix anyway)

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we should slowly adopt ruff.
I'd like to have a separate config, though. But that's a separate thing. I also have some prior art of doing said adoption in stages in Cheroot.

@webknjaz
webknjaz added this pull request to the merge queue Jun 26, 2025
Merged via the queue into jazzband:main with commit fb3b3e1 Jun 26, 2025
39 checks passed
@sirosen
sirosen deleted the make-isort-consistent-about-build branch June 27, 2025 00:47
@sirosen

sirosen commented Jun 27, 2025

Copy link
Copy Markdown
Member Author

I wouldn't mind using ruff, although I have been perfectly happy with the tooling which predates it.
I'm not in a hurry about it though.

Right now the major thing I see in pre-commit that needs attention is the mypy configuration. It doesn't even belong in pre-commit (I have some strong opinions on this one), so fixing that will be a body of work in its own right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Related to maintenance processes skip-changelog Avoid listing in changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants