oncall-engine/engine/apps/api/serializers
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
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
alert.py add several new database columns + emit two new Django signals (#1522) 2023-04-14 09:15:57 +02:00
alert_group.py add channel__team to internal api serializer select_related (#1805) 2023-04-20 18:30:49 +02:00
alert_receive_channel.py Fix demo-payload (#2139) 2023-06-08 23:31:18 +08:00
alerts_field_cache_buster_mixin.py add several new database columns + emit two new Django signals (#1522) 2023-04-14 09:15:57 +02:00
channel_filter.py Added preview and migration API endpoints for route migration from regex into jinja2 (#1715) 2023-04-18 02:53:53 +00:00
custom_button.py use CustomURLValidator in custom_button (#1398) 2023-03-23 12:21:17 +00:00
custom_serializers.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
escalation_chain.py Add alert group filter by escalation chain (#1535) 2023-03-14 14:38:18 +00:00
escalation_policy.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
integration_heartbeat.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
live_setting.py Allow no-auth SMTP connection for email notifications (#759) 2022-11-03 16:18:37 +00:00
on_call_shifts.py Add support to update web schedule rotations in-place (#2102) 2023-06-05 17:24:59 +00:00
organization.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
organization_slack_settings.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
paging.py Teams redesign (#1528) 2023-03-22 00:57:20 +08:00
public_api_token.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
resolution_note.py Optimize alert group list view (#299) 2022-07-27 14:14:59 +03:00
schedule_base.py Add support for web overrides to Terraform schedules (#1222) 2023-03-10 16:21:50 +00:00
schedule_calendar.py Add support for web overrides to Terraform schedules (#1222) 2023-03-10 16:21:50 +00:00
schedule_ical.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
schedule_polymorphic.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
schedule_reminder.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
schedule_web.py Add support for web overrides to Terraform schedules (#1222) 2023-03-10 16:21:50 +00:00
slack_channel.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
slack_user_identity.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
team.py Teams redesign (#1528) 2023-03-22 00:57:20 +08:00
telegram.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
user.py Phone provider refactoring (#1713) 2023-05-24 06:27:48 +00:00
user_group.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
user_notification_policy.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
webhook.py Webhooks 2 hide secrets (#2104) 2023-06-06 07:59:12 +00:00