mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-24 03:52:10 +00:00
multiple: Remove unnecessary Ruff suppression comments (#21050)
## Summary I ran `ruff check --extend-select RUF100 -n` to identify `# noqa` comments that weren't having any effect in Ruff, and then `ruff check --extend-select RUF100 -n --fix` on select files to remove all of the unnecessary `# noqa: F401` violations. It's possible that these were needed at some point in the past, but they're not necessary in Ruff v0.1.15 (used by LangChain) or in the latest release. Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
@@ -81,7 +81,7 @@ class LLMMathChain(Chain):
|
||||
return [self.output_key]
|
||||
|
||||
def _evaluate_expression(self, expression: str) -> str:
|
||||
import numexpr # noqa: F401
|
||||
import numexpr
|
||||
|
||||
try:
|
||||
local_dict = {"pi": math.pi, "e": math.e}
|
||||
|
@@ -46,7 +46,7 @@ class JsonEditDistanceEvaluator(StringEvaluator):
|
||||
self._string_distance = string_distance
|
||||
else:
|
||||
try:
|
||||
from rapidfuzz import distance as rfd # noqa: F401
|
||||
from rapidfuzz import distance as rfd
|
||||
except ImportError:
|
||||
raise ImportError(
|
||||
"The default string_distance operator for the "
|
||||
|
@@ -74,7 +74,7 @@ class JsonSchemaEvaluator(StringEvaluator):
|
||||
return node
|
||||
|
||||
def _validate(self, prediction: Any, schema: Any) -> dict:
|
||||
from jsonschema import ValidationError, validate # noqa: F401
|
||||
from jsonschema import ValidationError, validate
|
||||
|
||||
try:
|
||||
validate(instance=prediction, schema=schema)
|
||||
|
Reference in New Issue
Block a user