Skip to content

Commit

Permalink
Changes for a clean mypy run
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed May 17, 2024
1 parent 7aa8a96 commit 96e88d0
Show file tree
Hide file tree
Showing 5 changed files with 291 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ requirements/dev.txt: requirements/prod.txt
requirements/tests.txt: requirements/prod.txt
requirements/functests.txt: requirements/prod.txt
requirements/lint.txt: requirements/tests.txt requirements/functests.txt
requirements/typecheck.txt: requirements/prod.txt

# Add a requirements target so you can just run `make requirements` to
# re-compile *all* the requirements files at once.
Expand Down
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,24 @@ good-names = [
output-format = "colorized"
score = "no"

[tool.mypy]
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true

disable_error_code = [
# https://mypy.readthedocs.io/en/stable/error_code_list.html#code-import-untyped
"import-untyped",
]

[[tool.mypy.overrides]]
module= [
# Don't try to typecheck the tests for now
"tests.*",
]
ignore_errors = true


[tool.hdev]
project_name = "test-pyramid-app"
project_type = "application"
5 changes: 5 additions & 0 deletions requirements/typecheck.in
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
-r prod.txt

pip-tools
pip-sync-faster

mypy
269 changes: 266 additions & 3 deletions requirements/typecheck.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,274 @@
#
# pip-compile --allow-unsafe requirements/typecheck.in
#
mypy==1.8.0
alembic==1.13.1
# via -r requirements/prod.txt
amqp==5.1.1
# via
# -r requirements/prod.txt
# kombu
billiard==4.2.0
# via
# -r requirements/prod.txt
# celery
build==1.2.1
# via pip-tools
cachetools==5.3.0
# via
# -r requirements/prod.txt
# google-auth
celery==5.3.6
# via -r requirements/prod.txt
certifi==2023.7.22
# via
# -r requirements/prod.txt
# requests
# sentry-sdk
charset-normalizer==3.1.0
# via
# -r requirements/prod.txt
# requests
click==8.1.3
# via
# -r requirements/prod.txt
# celery
# click-didyoumean
# click-plugins
# click-repl
# pip-tools
click-didyoumean==0.3.0
# via
# -r requirements/prod.txt
# celery
click-plugins==1.1.1
# via
# -r requirements/prod.txt
# celery
click-repl==0.2.0
# via
# -r requirements/prod.txt
# celery
google-auth==2.17.2
# via
# -r requirements/prod.txt
# google-auth-oauthlib
google-auth-oauthlib==1.0.0
# via
# -r requirements/prod.txt
# pyramid-googleauth
greenlet==2.0.1
# via
# -r requirements/prod.txt
# sqlalchemy
gunicorn==22.0.0
# via -r requirements/prod.txt
h-pyramid-sentry==1.2.4
# via -r requirements/prod.txt
hupper==1.10.3
# via
# -r requirements/prod.txt
# pyramid
idna==3.7
# via
# -r requirements/prod.txt
# requests
importlib-metadata==7.1.0
# via pip-sync-faster
jinja2==3.1.4
# via
# -r requirements/prod.txt
# pyramid-jinja2
kombu==5.3.4
# via
# -r requirements/prod.txt
# celery
mako==1.2.4
# via
# -r requirements/prod.txt
# alembic
markupsafe==2.1.2
# via
# -r requirements/prod.txt
# jinja2
# mako
# pyramid-jinja2
mypy==1.10.0
# via -r requirements/typecheck.in
mypy-extensions==1.0.0
# via mypy
newrelic==9.8.0
# via -r requirements/prod.txt
oauthlib==3.2.2
# via
# -r requirements/prod.txt
# requests-oauthlib
packaging==23.1
# via
# -r requirements/prod.txt
# build
# gunicorn
# zope-sqlalchemy
pastedeploy==2.1.1
# via
# -r requirements/prod.txt
# plaster-pastedeploy
pip-sync-faster==0.0.3
# via -r requirements/typecheck.in
pip-tools==7.4.1
# via
# -r requirements/typecheck.in
# pip-sync-faster
plaster==1.0
# via
# -r requirements/prod.txt
# plaster-pastedeploy
# pyramid
plaster-pastedeploy==0.7
# via
# -r requirements/prod.txt
# pyramid
prompt-toolkit==3.0.38
# via
# -r requirements/prod.txt
# click-repl
psycopg2==2.9.9
# via -r requirements/prod.txt
pyasn1==0.4.8
# via
# -r requirements/prod.txt
# pyasn1-modules
# rsa
pyasn1-modules==0.2.8
# via
# -r requirements/prod.txt
# google-auth
pyjwt==2.6.0
# via
# -r requirements/prod.txt
# pyramid-googleauth
pyproject-hooks==1.1.0
# via
# build
# pip-tools
pyramid==2.0.2
# via
# -r requirements/prod.txt
# h-pyramid-sentry
# pyramid-googleauth
# pyramid-jinja2
# pyramid-tm
pyramid-googleauth==1.0.5
# via -r requirements/prod.txt
pyramid-jinja2==2.10.1
# via -r requirements/prod.txt
pyramid-tm==2.5
# via -r requirements/prod.txt
python-dateutil==2.8.2
# via
# -r requirements/prod.txt
# celery
requests==2.31.0
# via
# -r requirements/prod.txt
# requests-oauthlib
requests-oauthlib==1.3.1
# via
# -r requirements/prod.txt
# google-auth-oauthlib
rsa==4.9
# via
# -r requirements/prod.txt
# google-auth
sentry-sdk==1.40.6
# via
# -r requirements/prod.txt
# h-pyramid-sentry
six==1.16.0
# via
# -r requirements/prod.txt
# click-repl
# google-auth
# python-dateutil
sqlalchemy==2.0.29
# via
# -r requirements/prod.txt
# alembic
# zope-sqlalchemy
tomli==2.0.1
# via mypy
# via
# build
# mypy
# pip-tools
transaction==3.1.0
# via
# -r requirements/prod.txt
# pyramid-tm
# zope-sqlalchemy
translationstring==1.4
# via
# -r requirements/prod.txt
# pyramid
typing-extensions==4.9.0
# via mypy
# via
# -r requirements/prod.txt
# alembic
# mypy
# sqlalchemy
tzdata==2023.3
# via
# -r requirements/prod.txt
# celery
urllib3==1.26.18
# via
# -r requirements/prod.txt
# requests
# sentry-sdk
venusian==3.0.0
# via
# -r requirements/prod.txt
# pyramid
vine==5.1.0
# via
# -r requirements/prod.txt
# amqp
# celery
# kombu
wcwidth==0.2.6
# via
# -r requirements/prod.txt
# prompt-toolkit
webob==1.8.7
# via
# -r requirements/prod.txt
# pyramid
wheel==0.43.0
# via pip-tools
zipp==3.18.2
# via importlib-metadata
zope-deprecation==4.4.0
# via
# -r requirements/prod.txt
# pyramid
# pyramid-jinja2
zope-interface==5.4.0
# via
# -r requirements/prod.txt
# pyramid
# transaction
# zope-sqlalchemy
zope-sqlalchemy==3.1
# via -r requirements/prod.txt

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
# via pip-tools
setuptools==65.5.1
# via
# -r requirements/prod.txt
# pastedeploy
# pip-tools
# plaster
# pyramid
# zope-deprecation
# zope-interface
# zope-sqlalchemy
1 change: 1 addition & 0 deletions test_pyramid_app/scripts/init_db.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# mypy: disable-error-code="attr-defined"
"""
Initialize the DB.
Expand Down

0 comments on commit 96e88d0

Please sign in to comment.