-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
ref: Add ruff rules for pygrep-hooks (PGH) #4042
Conversation
@@ -10,8 +10,8 @@ | |||
import httpx | |||
import typer | |||
from dotenv import load_dotenv | |||
from multiprocess import cpu_count # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of # type: ignore
on 3rd party dependencies.
I guess those are optional ?
But shouldn't mypy be run with uv's dev
deps that contain those dependencies ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is because multiprocess is kinda weird. I'm not sure about the other ones but they generally are related to typing variables and outputs inside components. Not a lot of people know about cast
and how to type correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you get these mypy errors when you don't have the dependency.
In CI dev dependencies are installed and mypy still passes when removing the ignore
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiprocess is a base dependency in langflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then. I don't know why this ignore was there. Maybe some legacy ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Process is not explicitly exported in multiprocess.init
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't raise an error in mypy for me. Does it for you ?
Maybe we can check if CI passes ?
This pull request is automatically being deployed by Amplify Hosting (learn more). |
b815b1c
to
7c0f7f7
Compare
7c0f7f7
to
1d38aed
Compare
Add ruff rules for pygrep-hooks (PGH)
Add ruff rules for pygrep-hooks (PGH)