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

Lint unused import #5973

Merged
merged 5 commits into from
Dec 9, 2024
Merged

Lint unused import #5973

merged 5 commits into from
Dec 9, 2024

Conversation

huchenlei
Copy link
Collaborator

@huchenlei huchenlei commented Dec 9, 2024

This PR enforces lint rule unused-import.

The fix is generated by ruff --select F401 --fix **/*.py command. We should probably replace pylint with ruff later as it offers more features, and also faster (Written with Rust).

@@ -87,7 +87,8 @@ def execute_script(script_path):

if args.windows_standalone_build:
try:
import fix_torch
from fix_torch import fix_pytorch_libomp
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Convert module level execution to a function call here to avoid the unused import.

@huchenlei huchenlei marked this pull request as ready for review December 9, 2024 02:04
@comfyanonymous comfyanonymous added the Run-CI-Test This is an administrative label to tell the CI to run full automatic testing on this PR now. label Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 2024

(Automated Bot Message) CI Tests are running, you can view the results at https://ci.comfy.org/?branch=5973%2Fmerge

@comfyanonymous comfyanonymous merged commit 0fd4e6c into master Dec 9, 2024
7 of 19 checks passed
@comfyanonymous comfyanonymous deleted the lint_unused_import branch December 9, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Run-CI-Test This is an administrative label to tell the CI to run full automatic testing on this PR now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants