Skip to content

Conversation

luke396
Copy link
Contributor

@luke396 luke396 commented Mar 7, 2023

xref #51740, and fix

"pandas/core/reshape/*"
"pandas/core/strings/*" 
"pandas/core/tools/*"
"pandas/core/window/*"
"pandas/io/*"

@luke396 luke396 marked this pull request as draft March 7, 2023 02:10
@@ -1,3 +1,4 @@
# ruff: noqa: TCH004
from typing import TYPE_CHECKING

if TYPE_CHECKING:
Copy link
Contributor Author

@luke396 luke396 Mar 7, 2023

Choose a reason for hiding this comment

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

There will cause TCH004 Move import xxx out of type-checking block. Import is used for more than type hinting.

But move them to fix TCH004 will cause circular import, may be there is a better way to solve.

Edit: Same as in pandas/io/init.py

@luke396 luke396 marked this pull request as ready for review March 7, 2023 04:59
@MarcoGorelli MarcoGorelli added the Code Style Code style, linting, code_checks label Mar 7, 2023
@MarcoGorelli MarcoGorelli added this to the 2.1 milestone Mar 7, 2023
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Thanks @luke396 !

@MarcoGorelli MarcoGorelli merged commit edf1ba1 into pandas-dev:main Mar 7, 2023
@luke396 luke396 deleted the enable-ruff-TCH branch March 8, 2023 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants