Skip to content

Commit

Permalink
Fix erroneous mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
qubixes committed Nov 25, 2024
1 parent 2d90439 commit 2991370
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metasyn/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ def create(self, var_spec: Union[VarSpec, VarSpecAccess]) -> BaseDistribution:
try:
return dist_class(**dist_spec.parameters)
except TypeError as err:
dist_param = set(signature(dist_class.__init__).parameters) - {"self"}
dist_param = set(signature(dist_class.__init__).parameters) - {"self"} # type: ignore
if "args" in dist_param or "kwargs" in dist_param:
raise err
unknown_param = set(dist_spec.parameters) - dist_param
unknown_param = set(dist_spec.parameters) - dist_param # type: ignore
if len(unknown_param) > 0:
raise TypeError(f"Unknown parameters {unknown_param} for variable {var_spec.name}.")
raise err
Expand Down

0 comments on commit 2991370

Please sign in to comment.