Fix mypy errors in owid.py #5

Open
opened 2022-10-16 18:13:49 +02:00 by rmanach · 0 comments
rmanach commented 2022-10-16 18:13:49 +02:00 (Migrated from gitea.thegux.fr)
owid.py:29: error: Argument 1 to "len" has incompatible type "Optional[str]"; expected "Sized"
owid.py:35: error: Item "None" of "Optional[str]" has no attribute "upper"
owid.py:41: error: Function "numpy.core.multiarray.array" is not valid as a type
owid.py:41: note: Perhaps you need "Callable[...]" or a callback protocol?
owid.py:49: error: Value of type "None" is not indexable
owid.py:50: error: Need type annotation for "lst_var" (hint: "lst_var: List[<type>] = ...")
Found 5 errors in 1 file (checked 1 source file)
```log owid.py:29: error: Argument 1 to "len" has incompatible type "Optional[str]"; expected "Sized" owid.py:35: error: Item "None" of "Optional[str]" has no attribute "upper" owid.py:41: error: Function "numpy.core.multiarray.array" is not valid as a type owid.py:41: note: Perhaps you need "Callable[...]" or a callback protocol? owid.py:49: error: Value of type "None" is not indexable owid.py:50: error: Need type annotation for "lst_var" (hint: "lst_var: List[<type>] = ...") Found 5 errors in 1 file (checked 1 source file) ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rmanach/covid-plotter#5
No description provided.