-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(python): generate type-checking code (#1881)
There were a number of issues with the generated code that caused it not to properly validate though `mypy`: - Properties and method names could collide with buit-in types - `mypy` is unable to check decorations on decorated declarations - Those must be opted out with `#types: ignore` - `mypy` is unable to check dynamic base classes - Those must be opted out with `#types: ignore` - Impossible protocol conformance through meta-class - Removed `JSClass` and `Referenceable` in favor of `Type` and `Any` - Incorrect inference for the `_values` dictionary in *structs* - Had to add proper type annotation there - Had to add some `assert foo is not Null` in the implementation of non-optional struct property getters, to satisfy type checking Those issues were highlighted in awslabs/cdk8s#194
- Loading branch information
1 parent
4afbb51
commit e6d1bc1
Showing
12 changed files
with
1,729 additions
and
1,269 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ lib/version.ts | |
.settings | ||
target/ | ||
|
||
.venv/ | ||
|
||
*.js | ||
*.d.ts | ||
node_modules/ | ||
|
Oops, something went wrong.