Make MyPy happy
Fixes for various type errors throw by mypy.
Merge request reports
Activity
requested review from @moser
assigned to @karp
- Resolved by karp
- Resolved by karp
- Resolved by Jakob Moser
Looks great, thank you very much for your attention to detail!
I am not particularly happy about the alleged LSP violation. Why I understand why it is happening from a typing point of view, the fix doesn't feel ideal to me: You cannot set anything else than a
datetime
(orNone
) to aUtcDateTime
field, so I don't think we should silently fail in this case.Maybe SQLAlchemy can already handle this on its own? I'll have to think about this.
If you want to, you can open an MR containing everything but the two changes you commented on, which I will quickly approve and merge :)
mentioned in merge request !23
added 1 commit
- 7fa961af - Use Optional instead of | None for consistency
@karp I am currently reviewing the code, looks great! I made a few additions to the typing.
Now, I will still need to review
auth.py
andUtcDateTime.py
for semantic reasons (I am always a bit overcareful when it comes to auth, and I don't quite understand what I did with UtcDateTime anymore), but I will merge your suggestions later this day.mentioned in commit 533884ec