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: mark __main__ as first-party import #8805

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

Ezrashaw
Copy link
Contributor

Summary

Fixes #8750. import __main__ is now considered a first-party import, and is grouped accordingly by the linter and formatter.

Test Plan

Added a test based off code supplied in the linked issue.

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+1 -0 violations, +0 -0 fixes in 41 projects)

zulip/zulip (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --no-preview --select ALL

+ zerver/management/commands/runtornado.py:1:1: I001 [*] Import block is un-sorted or un-formatted

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
I001 1 1 0 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+1 -0 violations, +0 -0 fixes in 41 projects)

zulip/zulip (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

+ zerver/management/commands/runtornado.py:1:1: I001 [*] Import block is un-sorted or un-formatted

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
I001 1 1 0 0 0

@charliermarsh charliermarsh added the bug Something isn't working label Nov 21, 2023
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh merged commit bf729e7 into astral-sh:main Nov 21, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

__main__ is considered third party by isort
2 participants