Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run mypy in CI on the sydent package #416

Merged
merged 7 commits into from Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/mypy.yml
@@ -0,0 +1,15 @@
name: Mypy
on:
pull_request:
push:
branches: ["main"]
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.6'
- run: python -m pip install -e .[dev]
- run: mypy
1 change: 1 addition & 0 deletions changelog.d/416.misc
@@ -0,0 +1 @@
Run mypy on the sydent package as part of CI.
15 changes: 14 additions & 1 deletion pyproject.toml
Expand Up @@ -44,6 +44,18 @@ target-version = ['py36']
plugins = "mypy_zope:plugin"
show_error_codes = true
namespace_packages = true
strict = true

files = [
# Find files that pass with
# find sydent tests -type d -not -name __pycache__ -exec bash -c "mypy --strict '{}' > /dev/null" \; -print
"sydent/users",
# TODO the rest of CI checks these---mypy ought to too.
# "tests",
# "matrix_is_test",
# "scripts",
# "setup.py",
]

[[tool.mypy.overrides]]
module = [
Expand All @@ -53,9 +65,10 @@ module = [
"OpenSSL",
"prometheus_client",
"phonenumbers",
"sentry_sdk",
"signedjson.*",
"sortedcontainers",
"unpaddedbase64"
"unpaddedbase64",
]
ignore_missing_imports = true