Olen / Spond

GNU General Public License v3.0
45 stars 23 forks source link

Type annotation issue in `_SpondBase.require_authentication()` #124

Closed elliot-100 closed 5 months ago

elliot-100 commented 5 months ago

Not a runtime bug, and as type hints aren't enforced in this project, arguably only a documentation bug.

At:

def require_authentication(func: callable):

When mypy is run with default config:

> mypy spond
spond\base.py:25: error: Function "builtins.callable" is not valid as a type  [valid-type]
spond\base.py:25: note: Perhaps you meant "typing.Callable" instead of "callable"?
Found 1 error in 1 file (checked 4 source files)

If fixed as suggested:

> mypy spond
spond\base.py:26: error: Self argument missing for a non-static method (or an invalid type for self)