-
Notifications
You must be signed in to change notification settings - Fork 49
Type Annotations for RestrictedPython #317
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
Draft
zedzhen
wants to merge
44
commits into
zopefoundation:master
Choose a base branch
from
zedzhen:typing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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.
Draft
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
7876a87
Type Annotations for RestrictedPython
loechel 1cd6198
isinstance check with ExtSlice and Tuple as for older Python Versions
loechel e2599ab
liniting
loechel 4915d8e
Remove Python 3.9 as it end of life
loechel 3299a8b
Remove License Cassifier, as they are deprecated
loechel 4d56e39
Add Comment for TryStar Annotation
loechel 935a960
Add Comment for TryStar Annotation
loechel e67da67
Add Comment for TryStar Annotation
loechel 2a3d728
Add Changelog Entry
loechel 3373795
Base for Python 3.14 Updates
loechel f86d895
Update docs for Python 3.14
loechel b4ceb35
add provisional visit_TempalteStr and visit_Interpolation to transfor…
loechel 43941ee
Disable t-strings
loechel f0e2a06
Apply pre-commit code formatting
pre-commit-ci-lite[bot] 26a218c
reactivate Template-Strings
loechel a4e189e
Update Documentation for TemplateStr and Interploation
loechel fd0328a
Apply pre-commit code formatting
pre-commit-ci-lite[bot] aceca07
conditional import
loechel 3533c0f
fix coverage numbers
loechel e750331
readd Python 3.9 support
loechel 44f9842
Merge branch 'master' into typing
dataflake 5b8285c
- updating package files with zope/meta and fixing tests
dataflake ac53335
- fix last test
dataflake 6ecdf5a
Merge branch 'master' into typing
dataflake 0e1408c
- expand change log entry to be more clear.
dataflake 1ce3ce1
Merge branch 'master' into typing
zedzhen 652776e
Merge branch 'master' into typing
zedzhen 0a292d3
fix return type
zedzhen 444760e
style update (autopep8)
zedzhen 0e92a0b
add type hints for RestrictingNodeTransformer attributes
zedzhen be5ad38
update type hints for RestrictingNodeTransformer methods
zedzhen 37a4bec
update type hint for `policy` argument
zedzhen 55985ad
add type hints for RestrictingNodeTransformer.visit_Interpolation
zedzhen 99fd0be
update CHANGES.rst
zedzhen fd28e28
add types to CompileResult
zedzhen 501299a
fix type hint for used_names
zedzhen b56ad85
add None to the return type hints
zedzhen 2dd1fb5
add py.typed
zedzhen ea394dc
use "normal import"
zedzhen b1d1303
add list[ast.AST] to the return type hints
zedzhen 23ec481
add config for mypy
zedzhen 838d222
replace `compile(flags=ast.PyCF_ONLY_AST)` to `ast.parse`
zedzhen 2913cb6
update type hints
zedzhen 22ced90
add mypy check in pre-commit
zedzhen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import typing | ||
|
|
||
|
|
||
| _T = typing.TypeVar('_T') | ||
|
|
||
|
|
||
| def _cast_not_none(var: _T | None) -> _T: | ||
| return var # type: ignore[return-value] |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.