Skip to content

Commit 64b08da

Browse files
committed
🚨 Fix mypy unused type ignore
1 parent 79a2ba8 commit 64b08da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sqlmodel/_compat.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,15 @@ class SQLModelConfig(BaseConfig): # type: ignore[no-redef]
417417
def get_config_value(
418418
*, model: InstanceOrType["SQLModel"], parameter: str, default: Any = None
419419
) -> Any:
420-
return getattr(model.__config__, parameter, default) # type: ignore[union-attr]
420+
return getattr(model.__config__, parameter, default)
421421

422422
def set_config_value(
423423
*,
424424
model: InstanceOrType["SQLModel"],
425425
parameter: str,
426426
value: Any,
427427
) -> None:
428-
setattr(model.__config__, parameter, value) # type: ignore
428+
setattr(model.__config__, parameter, value)
429429

430430
def get_model_fields(model: InstanceOrType[BaseModel]) -> Dict[str, "FieldInfo"]:
431431
return model.__fields__ # type: ignore
@@ -608,7 +608,7 @@ def sqlmodel_validate(
608608
setattr(m, key, value)
609609
# Continue with standard Pydantic logic
610610
object.__setattr__(m, "__fields_set__", fields_set)
611-
m._init_private_attributes() # type: ignore[attr-defined] # noqa
611+
m._init_private_attributes()
612612
return m
613613

614614
def sqlmodel_init(*, self: "SQLModel", data: Dict[str, Any]) -> None:

0 commit comments

Comments
 (0)