-
Notifications
You must be signed in to change notification settings - Fork 18.4k
feat(langchain): add ruff rules PL #32079
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
CodSpeed WallTime Performance ReportMerging #32079 will not alter performanceComparing
|
4e1f999
to
112a284
Compare
@@ -87,7 +87,7 @@ def __init__(self, *args: Any, **kwargs: Any): | |||
) | |||
from langchain.chains.hyde.base import HypotheticalDocumentEmbedder as H | |||
|
|||
return H(*args, **kwargs) # type: ignore[return-value] | |||
return H(*args, **kwargs) # type: ignore[return-value] # noqa: PLE0101 |
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.
Will be fixed by #32078
CodSpeed Instrumentation Performance ReportMerging #32079 will not alter performanceComparing Summary
|
@@ -89,7 +89,6 @@ def _infer_model_and_provider( | |||
if provider is None and ":" in model: | |||
provider, model_name = _parse_model_string(model) | |||
else: | |||
provider = provider |
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 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 line was useless
@@ -10,6 +10,8 @@ class AnyStr(str): | |||
def __eq__(self, other: object) -> bool: | |||
return isinstance(other, str) | |||
|
|||
__hash__ = str.__hash__ |
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 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 is rule PLW1641: https://docs.astral.sh/ruff/rules/eq-without-hash/
112a284
to
1cfe00d
Compare
1cfe00d
to
b5ef32e
Compare
"C4", # flake8-comprehensions | ||
"COM", # flake8-commas | ||
"D", # pydocstyle | ||
"DOC", # pydoclint |
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.
what happened to DOC
?
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.
DOC is currently a preview rule.
There’s no point in activating it as we don’t run with the —preview
flag.
And we get a warning about it when running the lint.
See https://docs.astral.sh/ruff/rules/#pylint-pl