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

Migrate sys.rs generation to stdlibs #11374

Merged
merged 1 commit into from
May 13, 2024
Merged

Conversation

rmodpur
Copy link
Contributor

@rmodpur rmodpur commented May 12, 2024

Summary

Closes #11347

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+3 -0 violations, +0 -0 fixes in 1 projects; 43 projects unchanged)

pypa/cibuildwheel (+3 -0 violations, +0 -0 fixes)

+ test/test_from_sdist.py:1:1: I001 [*] Import block is un-sorted or un-formatted
+ test/test_pure_wheel.py:1:1: I001 [*] Import block is un-sorted or un-formatted
+ test/test_same_wheel.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 3 3 0 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+3 -0 violations, +0 -0 fixes in 1 projects; 43 projects unchanged)

pypa/cibuildwheel (+3 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ test/test_from_sdist.py:1:1: I001 [*] Import block is un-sorted or un-formatted
+ test/test_pure_wheel.py:1:1: I001 [*] Import block is un-sorted or un-formatted
+ test/test_same_wheel.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 3 3 0 0 0

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@charliermarsh charliermarsh self-requested a review May 13, 2024 00:21
@charliermarsh
Copy link
Member

Nice, thank you! The changes in cibuildwheel look right to me -- we were categorizing test as standard library before.

@charliermarsh charliermarsh merged commit 6a28f34 into astral-sh:main May 13, 2024
19 checks passed
@charliermarsh charliermarsh added the isort Related to import sorting label May 13, 2024
@@ -23,34 +14,19 @@
(3, 12),
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -61,10 +37,9 @@ class FakeApp:
"sre",
Copy link
Contributor

Choose a reason for hiding this comment

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

These hardcoded ones should probably be removed and change to modules = {} -- we haven't had sre since 2.7. I suspect these were added to work around bugs in the sphinx inventory?

Copy link
Member

Choose a reason for hiding this comment

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

if root not in ["__future__", "__main__"]:
modules.add(root)
for module in stdlib_module_names(f"{major_version}.{minor_version}"):
if module not in ["__future__", "__main__"]:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think __main__ would ever be reported as stdlib.

Copy link
Member

Choose a reason for hiding this comment

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

@thatch
Copy link
Contributor

thatch commented May 13, 2024

re test being stdlib, this was sometimes the case on py2 but we made the call that it was problematic to include. See omnilib/stdlibs#4

@charliermarsh
Copy link
Member

I think that's the right call @thatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
isort Related to import sorting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate sys.rs generation to stdlibs
3 participants