Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove type: ignore comment statements #999

Open
luitjansl opened this issue Apr 30, 2024 · 0 comments
Open

remove type: ignore comment statements #999

luitjansl opened this issue Apr 30, 2024 · 0 comments

Comments

@luitjansl
Copy link
Contributor

wile working on issue #990 many type-checking errors were removed, but some could not be, and in those cases a #type: ignore
statement was added.
Ideally, those should be fixed as well.
Some #type: ignore cannot be removed as they form part of the type-dispatched code.
The places where #type: ignore was added that may e can be fixed come from here:


Pixi task (default): mypy
imod\typing\structured.py:58: error: Argument 1 to "check_sizes" has incompatible type "defaultdict[Hashable, set[int]]"; expected "defaultdict[str, set[int]]"  [arg-type]
imod\typing\structured.py:67: error: Incompatible return value type (got "Coordinates", expected "dict[str, Any]")  [return-value]
imod\typing\structured.py:94: error: Argument 2 to "zip" has incompatible type "tuple[tuple[int, ...], ...] | None"; expected "Iterable[tuple[int, ...]]"  [arg-type]
imod\typing\structured.py:96: error: Argument 1 to "check_sizes" has incompatible type "defaultdict[Hashable, set[tuple[int, ...]]]"; expected "defaultdict[str, set[int]]"  [arg-type]
imod\typing\structured.py:247: error: List comprehension has incompatible type List[DataArray | Dataset]; expected List[DataArray]  [misc]
imod\typing\structured.py:252: error: Argument 1 to "_merge_partitions" has incompatible type "list[DataArray | Dataset]"; expected "list[DataArray]"  [arg-type]
imod\util\spatial.py:233: error: Argument 1 to "drop_vars" of "Dataset" has incompatible type "Hashable | Any"; expected "str | Iterable[Hashable] | Callable[[Dataset], str | Iterable[Hashable]]"  [arg-type]
imod\util\spatial.py:340: error: Item "None" of "Match[str] | None" has no attribute "groups"  [union-attr]
imod\prepare\wells.py:82: error: Value of type "float" is not indexable  [index]
imod\mf6\simulation.py:177: error: Argument 1 to "timestep_duration" has incompatible type "list[datetime64 | Any]"; expected "ndarray[Any, Any]"  [arg-type]
Found 10 errors in 4 files (checked 103 source files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📯 New
Development

No branches or pull requests

1 participant