-
-
Notifications
You must be signed in to change notification settings - Fork 732
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
Added Type Hints #1282
Draft
smithdc1
wants to merge
23
commits into
main
Choose a base branch
from
types
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+878
−421
Draft
Added Type Hints #1282
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
9009d1a
Added type hints.
smithdc1 2492511
Removed unused `# type:ignore`
smithdc1 cd558a3
Update as_crispy_form to avoid using Context
smithdc1 2c4b411
Updated _EngineTemplate to allow contex like objects
smithdc1 262bbc7
Type Tests pt1
smithdc1 da0db1e
Added more test return types
smithdc1 f86ab0d
Template, _EngineTemplate and Context Fixes
smithdc1 6380b8d
Removed use of Dict, Union and Optional.
smithdc1 17821ff
Field.render() returns SafeString
smithdc1 c015bba
List to list
smithdc1 0e0bb69
Added flake8-type-checking linter
smithdc1 c83675d
Added ContextDict type alias
smithdc1 3de4622
Add django-stubs myplugin
smithdc1 96a246f
Fixed context type for render_crispy_form
smithdc1 c51d8da
Added more types to test suite
smithdc1 7746c8d
Added more test assertions
smithdc1 b4c76ae
parse_form can also accept formsets.
smithdc1 520a08a
Added generic types to list_difference
smithdc1 66dbbe3
Legend and HTML can also accept translated strings.
smithdc1 7bafdb4
Added LayoutObjectFields Type Alias
smithdc1 3653135
Drop html5 test
smithdc1 b4c07d9
Pass Context not dict to CrispyFormNode.get_response_dict()
smithdc1 3234967
Add type to context dict.
smithdc1 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int | str | Node
can be replaced with_ContextKeys
https://github.com/typeddjango/django-stubs/blob/79276804b49f98b64f2c627f995832b469dc0338/django-stubs/template/context.pyi#L12