Skip to content

Commit

Permalink
Initial mypy config
Browse files Browse the repository at this point in the history
  • Loading branch information
kaapstorm committed Nov 19, 2024
1 parent e27b279 commit 86c82b0
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/check-type-hints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check type hints

on:
pull_request:
branches:
- master

jobs:
mypy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.9
- run: pip install mypy
- run: mypy --install-types --non-interactive --explicit-package-bases @mypy_modules.txt
20 changes: 20 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[mypy]
python_version = 3.9

# Check configuration
warn_unused_configs = True
warn_redundant_casts = True

# Type checking
disallow_any_generics = True
check_untyped_defs = True
warn_unused_ignores = True
warn_return_any = True
strict_equality = True

# Parse but don't check imported libraries
follow_imports = silent
ignore_missing_imports = True

# Reporting
pretty = True
16 changes: 16 additions & 0 deletions mypy_modules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
corehq/apps/app_manager/xform_builder.py
corehq/apps/case_search/xpath_functions/subcase_functions.py
corehq/apps/commtrack/fixtures.py
corehq/apps/domain/tests/test_forms.py
corehq/apps/es/tests/test_elastic_sync_multiplexed_command.py
corehq/apps/events/tests/test_tasks.py
corehq/apps/linked_domain/tests/test_migrate_feature_flag_domains.py
corehq/apps/reports/tests/test_case_data.py
corehq/apps/sms/forms.py
corehq/apps/userreports/models.py
corehq/apps/userreports/tests/test_data_source_config.py
corehq/apps/users/management/commands/add_data_dict_permissions.py
corehq/messaging/smsbackends/twilio/forms.py
corehq/messaging/smsbackends/twilio/models.py
corehq/motech/serializers.py
custom/onse/models.py

0 comments on commit 86c82b0

Please sign in to comment.