Commit 843ef35
authored
chore(python): use builtins.str instead of just str in Dict keys (#3866)
Added an integration test to verify parameters named `builtins` or `str`
do not shadow the relevant type names, which used to be problematic
until #3848 fixed the overarching issue, hoever the existing test only
covered the case where a parameter name shadowed an namespace/import.
Additionally, changes various `typing.Dict` keys that were mistakenly
spelled out as `str` to use `builtins.str` in order to improve overall
consistency in type declarations (see also #3866).
Co-authored-by: rmuller@amazon.fr
---
By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].
[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.01 parent 0b7dcc8 commit 843ef35
14 files changed
Lines changed: 1198 additions & 264 deletions
File tree
- packages
- @jsii/python-runtime/tests
- jsii-calc
- lib
- test
- jsii-pacmak
- lib/targets
- python
- test
- generated-code/__snapshots__
- targets/python
- jsii-reflect/test/__snapshots__
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3103 | 3103 | | |
3104 | 3104 | | |
3105 | 3105 | | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11432 | 11432 | | |
11433 | 11433 | | |
11434 | 11434 | | |
| 11435 | + | |
| 11436 | + | |
| 11437 | + | |
| 11438 | + | |
| 11439 | + | |
| 11440 | + | |
| 11441 | + | |
| 11442 | + | |
| 11443 | + | |
| 11444 | + | |
| 11445 | + | |
| 11446 | + | |
| 11447 | + | |
| 11448 | + | |
| 11449 | + | |
| 11450 | + | |
| 11451 | + | |
| 11452 | + | |
| 11453 | + | |
| 11454 | + | |
| 11455 | + | |
| 11456 | + | |
| 11457 | + | |
| 11458 | + | |
| 11459 | + | |
| 11460 | + | |
| 11461 | + | |
| 11462 | + | |
| 11463 | + | |
| 11464 | + | |
| 11465 | + | |
| 11466 | + | |
| 11467 | + | |
| 11468 | + | |
| 11469 | + | |
| 11470 | + | |
| 11471 | + | |
| 11472 | + | |
| 11473 | + | |
| 11474 | + | |
| 11475 | + | |
| 11476 | + | |
| 11477 | + | |
| 11478 | + | |
| 11479 | + | |
| 11480 | + | |
| 11481 | + | |
| 11482 | + | |
| 11483 | + | |
| 11484 | + | |
| 11485 | + | |
| 11486 | + | |
| 11487 | + | |
| 11488 | + | |
| 11489 | + | |
| 11490 | + | |
| 11491 | + | |
| 11492 | + | |
| 11493 | + | |
| 11494 | + | |
| 11495 | + | |
| 11496 | + | |
| 11497 | + | |
| 11498 | + | |
| 11499 | + | |
| 11500 | + | |
| 11501 | + | |
| 11502 | + | |
| 11503 | + | |
| 11504 | + | |
| 11505 | + | |
| 11506 | + | |
| 11507 | + | |
| 11508 | + | |
| 11509 | + | |
| 11510 | + | |
| 11511 | + | |
| 11512 | + | |
| 11513 | + | |
| 11514 | + | |
| 11515 | + | |
| 11516 | + | |
| 11517 | + | |
| 11518 | + | |
| 11519 | + | |
| 11520 | + | |
| 11521 | + | |
| 11522 | + | |
| 11523 | + | |
| 11524 | + | |
| 11525 | + | |
| 11526 | + | |
| 11527 | + | |
| 11528 | + | |
| 11529 | + | |
| 11530 | + | |
| 11531 | + | |
| 11532 | + | |
| 11533 | + | |
| 11534 | + | |
| 11535 | + | |
| 11536 | + | |
| 11537 | + | |
| 11538 | + | |
| 11539 | + | |
| 11540 | + | |
| 11541 | + | |
| 11542 | + | |
| 11543 | + | |
| 11544 | + | |
| 11545 | + | |
| 11546 | + | |
| 11547 | + | |
| 11548 | + | |
| 11549 | + | |
11435 | 11550 | | |
11436 | 11551 | | |
11437 | 11552 | | |
| |||
18684 | 18799 | | |
18685 | 18800 | | |
18686 | 18801 | | |
18687 | | - | |
| 18802 | + | |
18688 | 18803 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1207 | 1207 | | |
1208 | 1208 | | |
1209 | 1209 | | |
1210 | | - | |
| 1210 | + | |
1211 | 1211 | | |
1212 | 1212 | | |
1213 | 1213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments