Skip to content
Snippets Groups Projects

Fix mypy errors

Merged Michael Thies requested to merge fix/typing into master
3 files
+ 4
4
Compare changes
  • Side-by-side
  • Inline

Files

+ 2
2
@@ -47,9 +47,9 @@ class Date(datetime.date):
@@ -47,9 +47,9 @@ class Date(datetime.date):
def __new__(cls, year: int, month: Optional[int] = None, day: Optional[int] = None,
def __new__(cls, year: int, month: Optional[int] = None, day: Optional[int] = None,
tzinfo: Optional[datetime.tzinfo] = None) -> "Date":
tzinfo: Optional[datetime.tzinfo] = None) -> "Date":
res = datetime.date.__new__(cls, year, month, day) # type: ignore
res: "Date" = datetime.date.__new__(cls, year, month, day) # type: ignore # pickle support is not in typeshed
# TODO normalize tzinfo to '+12:00' through '-11:59'
# TODO normalize tzinfo to '+12:00' through '-11:59'
res._tzinfo = tzinfo
res._tzinfo = tzinfo # type: ignore # Workaround for MyPy bug, not recognizing our additional __slots__
return res
return res
def begin(self) -> datetime.datetime:
def begin(self) -> datetime.datetime:
Loading