nowcasting_dataset icon indicating copy to clipboard operation
nowcasting_dataset copied to clipboard

Try MyPy

Open JackKelly opened this issue 3 years ago • 1 comments

Detailed Description

Try automatically running MyPy on this code, to do static analysis

We might want to turn off a bunch of the less interesting warnings / errors :)

JackKelly avatar Oct 13 '21 13:10 JackKelly

Mypy fails to run in the root directory, as there is a nameclash in the notebooks (video.py exists three times):

$ mypy .
notebooks/2021-08/2021-08-26/video.py: error: Duplicate module named "video" (also at "./notebooks/2021-08/2021-08-25/video.py")
notebooks/2021-08/2021-08-26/video.py: note: Are you missing an __init__.py? Alternatively, consider using --exclude to avoid checking one of them.

Running mypy only on nowcasting_dataset shows 148 errors...

$ mypy nowcasting_dataset
nowcasting_dataset/dataset/split/model.py:4: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/filesystem/utils.py:6: error: Skipping analyzing "fsspec": found module but no type hints or library stubs
nowcasting_dataset/geospatial.py:6: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/geospatial.py:7: error: Skipping analyzing "pvlib": found module but no type hints or library stubs
nowcasting_dataset/geospatial.py:98: error: Bracketed expression "[...]" is not valid as a type
nowcasting_dataset/geospatial.py:98: note: Did you mean "List[...]"?
nowcasting_dataset/dataset/split/method.py:5: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/dataset/split/method.py:15: error: Incompatible default for argument "train_test_validation_split" (default has type "Tuple[int, int, int]", argument has type "Tuple[int]")
nowcasting_dataset/dataset/split/method.py:20: error: Syntax error in type annotation
nowcasting_dataset/dataset/split/method.py:20: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn)
nowcasting_dataset/dataset/split/method.py:132: error: Syntax error in type annotation
nowcasting_dataset/dataset/split/method.py:132: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn)
nowcasting_dataset/dataset/split/split.py:7: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/dataset/split/split.py:36: error: Incompatible default for argument "train_test_validation_split" (default has type "Tuple[int, int, int]", argument has type "Tuple[int]")
nowcasting_dataset/dataset/split/split.py:42: error: Syntax error in type annotation
nowcasting_dataset/dataset/split/split.py:42: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn)
nowcasting_dataset/dataset/split/split.py:113: error: Value of type "Optional[List[Any]]" is not indexable
nowcasting_dataset/dataset/split/split.py:114: error: Value of type "Optional[List[Any]]" is not indexable
nowcasting_dataset/dataset/split/split.py:145: error: Value of type "Optional[List[Any]]" is not indexable
nowcasting_dataset/dataset/split/split.py:146: error: Value of type "Optional[List[Any]]" is not indexable
nowcasting_dataset/dataset/split/split.py:155: error: Incompatible types in assignment (expression has type "Tuple[int, ...]", variable has type "List[int]")
nowcasting_dataset/dataset/split/split.py:160: error: Argument "train_test_validation_split" to "split_method" has incompatible type "List[int]"; expected "Tuple[int]"
nowcasting_dataset/data_sources/gsp/eso.py:22: error: Cannot find implementation or library stub for module named "geopandas"
nowcasting_dataset/data_sources/gsp/eso.py:23: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/gsp/pvlive.py:7: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/gsp/pvlive.py:8: error: Library stubs not installed for "pytz" (or incompatible with Python 3.9)
nowcasting_dataset/data_sources/gsp/pvlive.py:8: note: Hint: "python3 -m pip install types-pytz"
nowcasting_dataset/data_sources/gsp/pvlive.py:9: error: Cannot find implementation or library stub for module named "pvlive_api"
nowcasting_dataset/data_sources/gsp/pvlive.py:10: error: Skipping analyzing "tqdm": found module but no type hints or library stubs
nowcasting_dataset/data_sources/gsp/pvlive.py:98: error: "List[Any]" has no attribute "sort_values"
nowcasting_dataset/data_sources/gsp/pvlive.py:101: error: No overload variant of "__getitem__" of "list" matches argument type "str"
nowcasting_dataset/data_sources/gsp/pvlive.py:101: note: Possible overload variants:
nowcasting_dataset/data_sources/gsp/pvlive.py:101: note:     def __getitem__(self, SupportsIndex) -> Any
nowcasting_dataset/data_sources/gsp/pvlive.py:101: note:     def __getitem__(self, slice) -> List[Any]
nowcasting_dataset/data_sources/gsp/pvlive.py:104: error: "List[Any]" has no attribute "drop_duplicates"
nowcasting_dataset/data_sources/gsp/pvlive.py:107: error: No overload variant of "__setitem__" of "list" matches argument types "str", "Any"
nowcasting_dataset/data_sources/gsp/pvlive.py:107: note: Possible overload variants:
nowcasting_dataset/data_sources/gsp/pvlive.py:107: note:     def __setitem__(self, SupportsIndex, Any) -> None
nowcasting_dataset/data_sources/gsp/pvlive.py:107: note:     def __setitem__(self, slice, Iterable[Any]) -> None
nowcasting_dataset/data_sources/gsp/pvlive.py:107: error: No overload variant of "__getitem__" of "list" matches argument type "str"
nowcasting_dataset/data_sources/gsp/pvlive.py:107: note:     def __getitem__(self, SupportsIndex) -> Any
nowcasting_dataset/data_sources/gsp/pvlive.py:107: note:     def __getitem__(self, slice) -> List[Any]
nowcasting_dataset/utils.py:7: error: Skipping analyzing "fsspec.asyn": found module but no type hints or library stubs
nowcasting_dataset/utils.py:7: error: Skipping analyzing "fsspec": found module but no type hints or library stubs
nowcasting_dataset/utils.py:9: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/utils.py:13: error: Skipping analyzing "gcsfs": found module but no type hints or library stubs
nowcasting_dataset/utils.py:41: error: Incompatible return value type (got "bool_", expected "bool")
nowcasting_dataset/utils.py:109: error: Incompatible return value type (got "str", expected "Path")
nowcasting_dataset/utils.py:151: error: List item 0 has incompatible type "DataArray"; expected "Tuple[Any, ...]"
nowcasting_dataset/square.py:29: error: Unsupported operand types for * ("int" and "Number")
nowcasting_dataset/square.py:46: error: Unsupported operand types for + ("Number" and "float")
nowcasting_dataset/square.py:47: error: Unsupported operand types for - ("Number" and "float")
nowcasting_dataset/square.py:48: error: Unsupported operand types for - ("Number" and "float")
nowcasting_dataset/square.py:49: error: Unsupported operand types for + ("Number" and "float")
nowcasting_dataset/config/model.py:7: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/config/model.py:154: error: Incompatible types in assignment (expression has type "Pathy", variable has type "str")
nowcasting_dataset/data_sources/datasource_output.py:8: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/data_sources/datasource_output.py:9: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/config/save.py:5: error: Skipping analyzing "fsspec": found module but no type hints or library stubs
nowcasting_dataset/config/save.py:6: error: Library stubs not installed for "yaml" (or incompatible with Python 3.9)
nowcasting_dataset/config/load.py:7: error: Skipping analyzing "fsspec": found module but no type hints or library stubs
nowcasting_dataset/config/load.py:7: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
nowcasting_dataset/config/load.py:8: error: Skipping analyzing "gcsfs": found module but no type hints or library stubs
nowcasting_dataset/config/load.py:9: error: Library stubs not installed for "yaml" (or incompatible with Python 3.9)
nowcasting_dataset/config/load.py:9: note: Hint: "python3 -m pip install types-PyYAML"
nowcasting_dataset/config/load.py:9: note: (or run "mypy --install-types" to install all missing stub packages)
nowcasting_dataset/data_sources/topographic/topographic_model.py:2: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:9: error: Skipping analyzing "fsspec": found module but no type hints or library stubs
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:10: error: Skipping analyzing "numcodecs": found module but no type hints or library stubs
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:11: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:12: error: Skipping analyzing "tqdm": found module but no type hints or library stubs
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:24: error: Syntax error in type annotation
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:24: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn)
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:94: error: Cannot assign to a method
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:94: error: "Callable[[Any, int, int], int]" has no attribute "tz_localize"
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:95: error: Cannot assign to a method
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:95: error: "Callable[[Any, int, int], int]" has no attribute "tz_localize"
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:99: error: "List[Any]" has no attribute "round"
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:134: error: Syntax error in type annotation
nowcasting_dataset/data_sources/sun/raw_data_load_save.py:134: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn)
nowcasting_dataset/data_sources/datetime/datetime_model.py:2: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/time.py:7: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/time.py:8: error: Skipping analyzing "pvlib": found module but no type hints or library stubs
nowcasting_dataset/time.py:39: error: Argument 1 to "osgb_to_lat_lon" has incompatible type "float"; expected "Number"
nowcasting_dataset/time.py:39: error: Argument 2 to "osgb_to_lat_lon" has incompatible type "float"; expected "Number"
nowcasting_dataset/time.py:52: error: "List[Any]" has no attribute "max"
nowcasting_dataset/time.py:122: error: "List[Any]" has no attribute "sort_values"
nowcasting_dataset/data_sources/data_source.py:9: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/data_source.py:224: error: Signature of "__post_init__" incompatible with supertype "DataSource"
nowcasting_dataset/data_sources/data_source.py:228: error: Argument "meters_per_pixel" to "Square" has incompatible type "int"; expected "Number"
nowcasting_dataset/data_sources/data_source.py:248: error: Incompatible types in assignment (expression has type "None", variable has type "int")
nowcasting_dataset/data_sources/data_source.py:251: error: Signature of "__post_init__" incompatible with supertype "DataSource"
nowcasting_dataset/data_sources/data_source.py:297: error: "ZarrDataSource" has no attribute "_shape_of_example"
nowcasting_dataset/data_sources/data_source.py:299: error: "ZarrDataSource" has no attribute "_shape_of_example"
nowcasting_dataset/data_sources/sun/sun_model.py:2: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/data_sources/satellite/satellite_model.py:2: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/data_sources/pv/pv_model.py:2: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/data_sources/nwp/nwp_model.py:2: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/data_sources/metadata/metadata_model.py:6: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/data_sources/gsp/gsp_model.py:2: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/dataset/batch.py:8: error: Cannot find implementation or library stub for module named "pydantic"
nowcasting_dataset/dataset/batch.py:241: error: Item "Dict[Any, Any]" of "Union[Batch, Dict[Any, Any]]" has no attribute "save_netcdf"
nowcasting_dataset/data_sources/topographic/topographic_data_source.py:6: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/topographic/topographic_data_source.py:7: error: Skipping analyzing "rioxarray": found module but no type hints or library stubs
nowcasting_dataset/data_sources/topographic/topographic_data_source.py:9: error: Skipping analyzing "rasterio.warp": found module but no type hints or library stubs
nowcasting_dataset/data_sources/topographic/topographic_data_source.py:45: error: Incompatible types in assignment (expression has type "None", variable has type "str")
nowcasting_dataset/data_sources/topographic/topographic_data_source.py:48: error: Signature of "__post_init__" incompatible with supertype "DataSource"
nowcasting_dataset/data_sources/sun/sun_data_source.py:4: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/sun/sun_data_source.py:55: error: Argument 2 to "isclose" has incompatible type "Number"; expected "Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], Union[Union[_SupportsArray[dtype[Any]], Sequence[_SupportsArray[dtype[Any]]], Sequence[Sequence[_SupportsArray[dtype[Any]]]], Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]]]], Union[bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]]"
nowcasting_dataset/data_sources/sun/sun_data_source.py:56: error: Argument 2 to "isclose" has incompatible type "Number"; expected "Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], Union[Union[_SupportsArray[dtype[Any]], Sequence[_SupportsArray[dtype[Any]]], Sequence[Sequence[_SupportsArray[dtype[Any]]]], Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]]]], Union[bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]]"
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:9: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:74: error: Incompatible types in assignment (expression has type "None", variable has type "str")
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:75: error: Incompatible types in assignment (expression has type "Optional[Iterable[str]]", base class "ZarrDataSource" defined the type as "Iterable[str]")
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:80: error: Signature of "__post_init__" incompatible with supertype "DataSource"
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:83: error: Need type annotation for "_cache" (hint: "_cache: Dict[<type>, <type>] = ...")
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:84: error: Argument 1 to "len" has incompatible type "Optional[Iterable[str]]"; expected "Sized"
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:101: error: Incompatible types in assignment (expression has type "DataArray", variable has type "None")
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:102: error: "None" has no attribute "sel"
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:102: error: Argument 1 to "list" has incompatible type "Optional[Iterable[str]]"; expected "Iterable[str]"
nowcasting_dataset/data_sources/satellite/satellite_data_source.py:207: error: Argument "locations" to "select_daylight_datetimes" has incompatible type "List[Tuple[Number, Number]]"; expected "Iterable[Tuple[float, float]]"
nowcasting_dataset/data_sources/pv/pv_data_source.py:12: error: Skipping analyzing "gcsfs": found module but no type hints or library stubs
nowcasting_dataset/data_sources/pv/pv_data_source.py:14: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/pv/pv_data_source.py:45: error: Signature of "__post_init__" incompatible with supertype "DataSource"
nowcasting_dataset/data_sources/pv/pv_data_source.py:116: error: Bracketed expression "[...]" is not valid as a type
nowcasting_dataset/data_sources/pv/pv_data_source.py:116: note: Did you mean "List[...]"?
nowcasting_dataset/data_sources/pv/pv_data_source.py:140: error: Argument 2 to "isclose" has incompatible type "Number"; expected "Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], Union[Union[_SupportsArray[dtype[Any]], Sequence[_SupportsArray[dtype[Any]]], Sequence[Sequence[_SupportsArray[dtype[Any]]]], Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]]]], Union[bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]]"
nowcasting_dataset/data_sources/pv/pv_data_source.py:141: error: Argument 2 to "isclose" has incompatible type "Number"; expected "Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], Union[Union[_SupportsArray[dtype[Any]], Sequence[_SupportsArray[dtype[Any]]], Sequence[Sequence[_SupportsArray[dtype[Any]]]], Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]]]], Union[bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]]"
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:9: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:89: error: Incompatible types in assignment (expression has type "None", variable has type "str")
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:90: error: Incompatible types in assignment (expression has type "Optional[Iterable[str]]", base class "ZarrDataSource" defined the type as "Iterable[str]")
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:94: error: Signature of "__post_init__" incompatible with supertype "DataSource"
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:104: error: Argument 1 to "len" has incompatible type "Optional[Iterable[str]]"; expected "Sized"
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:122: error: Incompatible types in assignment (expression has type "DataArray", variable has type "None")
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:122: error: Argument 1 to "list" has incompatible type "Optional[Iterable[str]]"; expected "Iterable[Any]"
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:189: error: Incompatible return value type (got "Dataset", expected "DataArray")
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:255: error: Incompatible types in assignment (expression has type "ndarray[Any, Any]", variable has type "DataArray")
nowcasting_dataset/data_sources/nwp/nwp_data_source.py:257: error: Incompatible types in assignment (expression has type "ndarray[Any, Any]", variable has type "DataArray")
nowcasting_dataset/data_sources/metadata/metadata_data_source.py:6: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/gsp/gsp_data_source.py:13: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/data_sources/gsp/gsp_data_source.py:59: error: Signature of "__post_init__" incompatible with supertype "DataSource"
nowcasting_dataset/data_sources/gsp/gsp_data_source.py:243: error: Argument 2 to "isclose" has incompatible type "Number"; expected "Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], Union[Union[_SupportsArray[dtype[Any]], Sequence[_SupportsArray[dtype[Any]]], Sequence[Sequence[_SupportsArray[dtype[Any]]]], Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]]]], Union[bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]]"
nowcasting_dataset/data_sources/gsp/gsp_data_source.py:244: error: Argument 2 to "isclose" has incompatible type "Number"; expected "Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], Union[Union[_SupportsArray[dtype[Any]], Sequence[_SupportsArray[dtype[Any]]], Sequence[Sequence[_SupportsArray[dtype[Any]]]], Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[Any]]]]]]], Union[bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]]"
nowcasting_dataset/data_sources/gsp/gsp_data_source.py:305: error: Bracketed expression "[...]" is not valid as a type
nowcasting_dataset/data_sources/gsp/gsp_data_source.py:305: note: Did you mean "List[...]"?
nowcasting_dataset/data_sources/datetime/datetime_data_source.py:6: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/dataset/datasets.py:9: error: Skipping analyzing "boto3": found module but no type hints or library stubs
nowcasting_dataset/dataset/datasets.py:10: error: Skipping analyzing "gcsfs": found module but no type hints or library stubs
nowcasting_dataset/dataset/datasets.py:12: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/dataset/datasets.py:222: error: Argument "history_minutes" to "subselect_data" has incompatible type "Optional[int]"; expected "int"
nowcasting_dataset/dataset/datasets.py:223: error: Argument "forecast_minutes" to "subselect_data" has incompatible type "Optional[int]"; expected "int"
nowcasting_dataset/dataset/datasets.py:306: error: Incompatible return value type (got "List[<nothing>]", expected "Tensor")
nowcasting_dataset/dataset/datasets.py:404: error: Value of type "Union[DataArray, ndarray[Any, Any], Tensor, int]" is not indexable
nowcasting_dataset/dataset/datasets.py:407: error: Item "None" of "Optional[Satellite]" has no attribute "sat_datetime_index"
nowcasting_dataset/dataset/datasets.py:411: error: Item "None" of "Optional[Satellite]" has no attribute "sat_datetime_index"
nowcasting_dataset/dataset/validate.py:5: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/dataset/validate.py:97: error: Item "int" of "Union[DataArray, ndarray[Any, Any], Tensor, int]" has no attribute "reshape"
nowcasting_dataset/dataset/datamodule.py:9: error: Skipping analyzing "pandas": found module but no type hints or library stubs
nowcasting_dataset/dataset/datamodule.py:115: error: Argument "filename" to "SatelliteDataSource" has incompatible type "Union[str, Path]"; expected "str"
nowcasting_dataset/dataset/datamodule.py:134: error: Argument "metadata_filename" to "PVDataSource" has incompatible type "Union[str, Path, None]"; expected "Union[str, Path]"
nowcasting_dataset/dataset/datamodule.py:146: error: List item 0 has incompatible type "PVDataSource"; expected "SatelliteDataSource"
nowcasting_dataset/dataset/datamodule.py:163: error: Incompatible types in assignment (expression has type "List[GSPDataSource]", variable has type "List[SatelliteDataSource]")
nowcasting_dataset/dataset/datamodule.py:163: error: Unsupported operand types for + ("List[GSPDataSource]" and "List[SatelliteDataSource]")
nowcasting_dataset/dataset/datamodule.py:178: error: Argument 1 to "append" of "list" has incompatible type "NWPDataSource"; expected "SatelliteDataSource"
nowcasting_dataset/dataset/datamodule.py:183: error: Argument "filename" to "TopographicDataSource" has incompatible type "Union[str, Path]"; expected "str"
nowcasting_dataset/dataset/datamodule.py:192: error: Argument 1 to "append" of "list" has incompatible type "TopographicDataSource"; expected "SatelliteDataSource"
nowcasting_dataset/dataset/datamodule.py:202: error: Argument 1 to "append" of "list" has incompatible type "SunDataSource"; expected "SatelliteDataSource"
nowcasting_dataset/dataset/datamodule.py:209: error: Argument 1 to "append" of "list" has incompatible type "DatetimeDataSource"; expected "SatelliteDataSource"
nowcasting_dataset/dataset/datamodule.py:212: error: Argument 1 to "append" of "list" has incompatible type "MetadataDataSource"; expected "SatelliteDataSource"
Found 148 errors in 36 files (checked 51 source files)

flowirtz avatar Oct 15 '21 13:10 flowirtz