core: Add ruff rules for PIE (#26939)

All auto-fixes.
This commit is contained in:
Christophe Bornet
2024-09-27 18:08:35 +02:00
committed by GitHub
parent 836c2a4ae0
commit f4e738bb40
21 changed files with 16 additions and 52 deletions

View File

@@ -36,8 +36,6 @@ else:
class EmptyDict(TypedDict, total=False):
"""Empty dict type."""
pass
class RunnableConfig(TypedDict, total=False):
"""Configuration for a Runnable."""

View File

@@ -457,8 +457,6 @@ RunnableConfigurableFields.model_rebuild()
class StrEnum(str, enum.Enum):
"""String enum."""
pass
_enums_for_spec: WeakValueDictionary[
Union[

View File

@@ -619,7 +619,8 @@ class RunnableWithFallbacks(RunnableSerializable[Input, Output]):
return self.__class__(
**{
**self.model_dump(),
**{"runnable": new_runnable, "fallbacks": new_fallbacks},
"runnable": new_runnable,
"fallbacks": new_fallbacks,
}
)