delph-in / pydelphin

Python libraries for DELPH-IN
https://pydelphin.readthedocs.io/
MIT License
77 stars 27 forks source link

Implicit optionals no longer allowed in type checking with Mypy #360

Closed goodmami closed 1 year ago

goodmami commented 1 year ago

Implicit optional argument types are no longer allowed by default with recent versions of Mypy:

def foo(x: int = None) -> int:  # type check error
    ...

They should now be:

def foo(x: Optional[int] = None) -> int:
    ...