-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 RUF #4001
ref: Add ruff rules RUF #4001
Conversation
"RUF006", # TODO (Store a reference to the return value of `asyncio.create_task`) | ||
"RUF012", # TODO (Mutable class attributes should be annotated with `typing.ClassVar`) |
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.
At the moment I ignore these rules as they deserve some discussion.
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.
As for RUF012, there seems to be an issue in ruff not detecting pydantic models. Ruff should normally ignore pydantic models for this rule as pydantic does a deep copy of default objects.
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 opened astral-sh/ruff#13630
This pull request is automatically being deployed by Amplify Hosting (learn more). |
@@ -53,7 +53,7 @@ def update_build_config(self, build_config: dotdict, field_value: Any, field_nam | |||
# Add inputs to the build config | |||
build_config = self.add_inputs_to_build_config(inputs, build_config) | |||
except Exception as e: | |||
logger.error(f"Error getting flow {field_value}: {str(e)}") | |||
logger.error(f"Error getting flow {field_value}: {e}") |
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.
Maybe we could use logger.exception
here and remove the error from the message as it will be in the traceback ?
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 agree.
src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py
Show resolved
Hide resolved
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.
LGTM
8798c94
to
35342ab
Compare
35342ab
to
2a3edfc
Compare
c967c87
to
ed87d64
Compare
084a5c3
to
b0338b7
Compare
Add ruff rules RUF