oncall-engine/engine/apps/alerts
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
..
escalation_snapshot add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
grafana_alerting_sync_manager add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
incident_appearance Fix warnings when running backend tests (#2079) 2023-06-06 18:38:00 +00:00
incident_log_builder modify check_escalation_finished_task task (#1266) 2023-03-17 10:14:08 +00:00
migrations OnCall prometheus metrics exporter (#1605) 2023-05-25 18:26:13 +00:00
models add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
tasks add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
terraform_renderer add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
tests add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
admin.py Alert group search (#488) 2022-09-06 11:30:12 +01:00
constants.py OnCall prometheus metrics exporter (#1605) 2023-05-25 18:26:13 +00:00
integration_options_mixin.py Change integrations page wording and add more guidance (#1986) 2023-05-31 11:26:36 +00:00
paging.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
representative.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
signals.py Fix warnings when running backend tests (#2079) 2023-06-06 18:38:00 +00:00
utils.py Fix outgoing webhook to resolve IP from parsed hostname 2022-09-22 14:35:37 -03:00