* server/mypy: Enable no_implicit_optional
no_implicit_optional Changes the treatment of arguments with a default value of None by not implicitly making their type Optional.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#none-and-optional-handling
* server/mypy: Enable warn_unused_ignores
warn_unused_ignores: Warns about unneeded # type: ignore comments.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#configuring-warnings
It's best to exclude packages with no typing in mypy.ini rather than in
the code. This waym if tin the future these packages add types it's can
easily be disabled (by removing the exclusion in mypy.ini).
* api/user: Fix user password was not really validated
* api/test/base: Remove unreachable code
Team is created in setup, so no reason for it not to be there (unless
setUp is overriden by child, which as far as I can see is currently not
happening),
* server/mypy: Enable check_untyped_defs
check_untyped_defs: Type-checks the interior of functions without type annotations.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#untyped-definitions-and-calls
* server/mypy: Enable strict_equality
strict_equality: Prohibit equality checks, identity checks, and container checks between non-overlapping types.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#miscellaneous-strictness-flags
* server/mypy: Enable warn_unreachable
Added a fixme for a possible oversight in function that parses JSON.
warn_unreachable: Shows a warning when encountering any code
inferred to be unreachable or redundant after performing type
analysis.
Ref: https://mypy.readthedocs.io/en/stable/config_file.html#configuring-warnings
* api/posthog: fix possible bug when batch is not a list
Current code assumes batch is a valid list. If batch is not a list, the
capture handling will cause a 500 error.
* fix stricter mypy
* Use response.json instead of .data
Co-authored-by: Haki Benita <hakibenita@gmail.com>