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

fix(web_api): add type stubs for stripe #816

Merged
merged 1 commit into from
Jun 4, 2022
Merged

Conversation

sbdchd
Copy link
Collaborator

@sbdchd sbdchd commented Jun 4, 2022

Latest version of stripe type stubs are more filled out and provide some useful type checking:
python/typeshed#7978

Latest version of stripe type stubs are more filled out.
@@ -41,6 +41,9 @@ types-redis = "^0.1.10"
types-dj-database-url = "^0.5.0"
responses = "^0.21.0"
pytest-django = "^4.5.2"
types-stripe = "^2.59.10"
pydantic = "^1.9.1"
types-requests = "^2.27.30"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mypy no longer ships the typeshed so we need to specify what we want

@@ -15,7 +15,8 @@
patch_django()


sentry_sdk.init(integrations=[DjangoIntegration()], send_default_pii=True)
# Waiting on https://github.com/getsentry/sentry-python/issues/1415
sentry_sdk.init(integrations=[DjangoIntegration()], send_default_pii=True) # type: ignore[abstract]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -41,6 +41,9 @@ types-redis = "^0.1.10"
types-dj-database-url = "^0.5.0"
responses = "^0.21.0"
pytest-django = "^4.5.2"
types-stripe = "^2.59.10"
pydantic = "^1.9.1"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating due to mypy issue: pydantic/pydantic#3528

@@ -24,7 +24,7 @@ pywatchman = "^1.4"
[tool.poetry.dev-dependencies]
pylint = "^2.4"
pytest = "6.0.1"
mypy = "^0.812"
mypy = "^0.960"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated so mypy understandings type[T]

@sbdchd sbdchd requested a review from chdsbd June 4, 2022 20:00
@sbdchd sbdchd added the automerge Mark PR for auto merge by Kodiak label Jun 4, 2022
@kodiakhq kodiakhq bot merged commit 86559a0 into master Jun 4, 2022
@kodiakhq kodiakhq bot deleted the steve/add-mypy-types branch June 4, 2022 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Mark PR for auto merge by Kodiak
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants