oncall-engine/engine/common
Joey Orlando 9dde1805aa
add mypy static type checker to backend codebase (#2151)
# What this PR does

- Adds [`mypy` static type checking](https://mypy-lang.org/) to our CI
pipeline. Currently there is still a **ton** of errors being returned by
the tool, as we'll need to fix pre-existing errors. I think we can
slowly chip away at these errors in small PRs, doing them all in one
large PR is likely very risky.
- Also, this PR starts chipping away at one of the main type errors that
we have which is accessing the `datetime` class (from the `datetime`
library) or `timedelta` function on the `django.utils.timezone` module.
Basically we should be instead accessing these two objects from the
native `datetime` module. This makes sense because the [`__all__`
attribute](https://github.com/django/django/blob/main/django/utils/timezone.py#L14-L30)
in `django.utils.timezone` does not re-export `datetime` or `timedelta`.
- splits `engine` dependencies out into `requirements.txt` and
`requirements-dev.txt`

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-06-12 12:50:33 -04:00
..
api_helpers Make viewset actions more consistent (#2120) 2023-06-07 12:10:53 +00:00
constants add several new database columns + emit two new Django signals (#1522) 2023-04-14 09:15:57 +02:00
custom_celery_tasks World, meet OnCall! 2022-06-03 08:09:47 -06:00
exceptions Send demo alert with dynamic payload and get demo payload example on private api (#1700) 2023-04-18 02:48:11 +00:00
insight_log Insight logs format fixes (#1763) 2023-04-17 10:10:47 +00:00
jinja_templater Added preview and migration API endpoints for route migration from regex into jinja2 (#1715) 2023-04-18 02:53:53 +00:00
oncall_gateway Slack team connector v2 (#1581) 2023-03-28 03:27:45 +00:00
recaptcha Add validation of hostname for recapctha (#1445) 2023-03-06 08:59:48 +00:00
tests Make viewset actions more consistent (#2120) 2023-06-07 12:10:53 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
admin.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
database.py Fix Grafana teams sync (#1652) 2023-03-28 18:26:24 +00:00
public_primary_keys.py Insight logs (#348) 2022-08-24 12:04:44 +05:00
timezones.py centralize timezone validation + add serializer validation for on call shifts and schedules (#924) 2022-12-01 14:13:39 +01:00
utils.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00