ci: suppress some mypy issues after upgrade
This commit is contained in:
parent
bef832cbff
commit
58d2e25a42
2 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ def make_config(cls: Type[C], migration: Callable[[Attrs], Attrs]=lambda x: x) -
|
|||
params = {
|
||||
k: v
|
||||
for k, v in new_props.items()
|
||||
if k in {f.name for f in fields(cls)}
|
||||
if k in {f.name for f in fields(cls)} # type: ignore[arg-type] # see https://github.com/python/typing_extensions/issues/115
|
||||
}
|
||||
# todo maybe return type here?
|
||||
return cls(**params) # type: ignore[call-arg]
|
||||
|
|
|
@ -8,7 +8,7 @@ D = TypeVar('D')
|
|||
|
||||
|
||||
def _freeze_dataclass(Orig: Type[D]):
|
||||
ofields = [(f.name, f.type, f) for f in dcl.fields(Orig)]
|
||||
ofields = [(f.name, f.type, f) for f in dcl.fields(Orig)] # type: ignore[arg-type] # see https://github.com/python/typing_extensions/issues/115
|
||||
|
||||
# extract properties along with their types
|
||||
props = list(inspect.getmembers(Orig, lambda o: isinstance(o, property)))
|
||||
|
@ -35,7 +35,7 @@ class Freezer(Generic[D]):
|
|||
|
||||
def freeze(self, value: D) -> D:
|
||||
pvalues = {name: getattr(value, name) for name, _ in self.props}
|
||||
return self.Frozen(**dcl.asdict(value), **pvalues)
|
||||
return self.Frozen(**dcl.asdict(value), **pvalues) # type: ignore[call-overload] # see https://github.com/python/typing_extensions/issues/115
|
||||
|
||||
|
||||
### tests
|
||||
|
|
Loading…
Add table
Reference in a new issue