-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add type hints, fix mypy issues (#198) #228
Merged
Merged
Commits on Jun 28, 2024
-
Update tox.ini for Django 3.2, pypy, gh
* Specify how to install Django 3.2. These tests are currently running against later Django versions. * Add basepython entries for pypy. This fixes running tox locally. * Fix the cpython version mapping in [gh-actions]. The github action tests for cpython versions are running against the latest Django, instead of the set of possible Django versions.
Configuration menu - View commit details
-
Copy full SHA for d2a460b - Browse repository at this point
Copy the full SHA d2a460bView commit details -
Remove pypy from Django 3.2 testing
There are a few test failures with pypy and Django 3.2. Since 3.2 is out of long-term support, drop these from the test matrix.
Configuration menu - View commit details
-
Copy full SHA for f4f83ad - Browse repository at this point
Copy the full SHA f4f83adView commit details -
Configuration menu - View commit details
-
Copy full SHA for 441fdf9 - Browse repository at this point
Copy the full SHA 441fdf9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3acd7b7 - Browse repository at this point
Copy the full SHA 3acd7b7View commit details -
Use getattr, setattr for dynamic attribute access
mypy complains when reading or setting a attribute that is not defined on the class, such as HttpRequest.csp_nonce. This updates the code to use getattr and setattr to access these dynamically added attributes and for Django settings.
Configuration menu - View commit details
-
Copy full SHA for 5854441 - Browse repository at this point
Copy the full SHA 5854441View commit details -
Both startswith() and parser.parse_statements take a tuple rather than a list.
Configuration menu - View commit details
-
Copy full SHA for abf8c1b - Browse repository at this point
Copy the full SHA abf8c1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 035844a - Browse repository at this point
Copy the full SHA 035844aView commit details -
Althought the code `template.render(context)` looked similar, mypy complained that Django's Template could not take a dict. Rather than switch on types, refactor `make_context` and `make_template` into `render`, which hides the typing details between Django templates and extension templates like Jinja2.
Configuration menu - View commit details
-
Copy full SHA for 932856e - Browse repository at this point
Copy the full SHA 932856eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 26c03b1 - Browse repository at this point
Copy the full SHA 26c03b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42125a5 - Browse repository at this point
Copy the full SHA 42125a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f247464 - Browse repository at this point
Copy the full SHA f247464View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b728aa - Browse repository at this point
Copy the full SHA 0b728aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2a4317 - Browse repository at this point
Copy the full SHA c2a4317View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0afd172 - Browse repository at this point
Copy the full SHA 0afd172View commit details
Commits on Jul 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a14b51c - Browse repository at this point
Copy the full SHA a14b51cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.