Skip to content

Commit

Permalink
🚨 Fix mypy unused type ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanx64 committed Jul 3, 2024
1 parent 79a2ba8 commit 64b08da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sqlmodel/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,15 +417,15 @@ class SQLModelConfig(BaseConfig): # type: ignore[no-redef]
def get_config_value(
*, model: InstanceOrType["SQLModel"], parameter: str, default: Any = None
) -> Any:
return getattr(model.__config__, parameter, default) # type: ignore[union-attr]
return getattr(model.__config__, parameter, default)

def set_config_value(
*,
model: InstanceOrType["SQLModel"],
parameter: str,
value: Any,
) -> None:
setattr(model.__config__, parameter, value) # type: ignore
setattr(model.__config__, parameter, value)

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

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

0 comments on commit 64b08da

Please sign in to comment.