lemonsaurus / django-simple-bulma

Django application to add the Bulma CSS framework and its extensions
MIT License
137 stars 17 forks source link

Tuple() typehint instead of Tuple[] in SimpleBulmaFinder.list #51

Closed makupi closed 4 years ago

makupi commented 4 years ago
  File "C:\Users\maku\.virtualenvs\friendly-frogs-ICo_ojhS\lib\site-packages\django_simple_bulma\finders.py", line 17, in <module>
    class SimpleBulmaFinder(BaseFinder):
  File "C:\Users\maku\.virtualenvs\friendly-frogs-ICo_ojhS\lib\site-packages\django_simple_bulma\finders.py", line 171, in SimpleBulmaFinder
    def list(self, _: List[str]) -> Tuple(str, FileSystemStorage):
  File "c:\users\maku\appdata\local\programs\python\python38-32\lib\typing.py", line 724, in __call__
    raise TypeError(f"Type {self._name} cannot be instantiated; "
TypeError: Type Tuple cannot be instantiated; use tuple() instead

Getting this error when using py manage.py runserver.
Looks like the typehint for the return type with Tuple should be Tuple[str, FileSystemStorage] instead of using parentheses.

SebastiaanZ commented 4 years ago

That's a bug, thanks.

lemonsaurus commented 4 years ago

Addressed in v1.3.1