Commit 8c4bfd1
Fix all-export generation for hyphenated directories (#3033)
Fixes a bug where --all-exports-scope fails to generate __all__ imports
for packages originating from schema directories with hyphens in the
path.
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>1 parent 3c244da commit 8c4bfd1
5 files changed
Lines changed: 52 additions & 4 deletions
File tree
- src/datamodel_code_generator/parser
- tests
- data
- expected/main/jsonschema/all_exports_hyphenated_directory/hyphenated_directory
- jsonschema/all_exports_hyphenated_directory/hyphenated-directory
- main
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2592 | 2592 | | |
2593 | 2593 | | |
2594 | 2594 | | |
2595 | | - | |
| 2595 | + | |
| 2596 | + | |
2596 | 2597 | | |
2597 | 2598 | | |
2598 | 2599 | | |
2599 | | - | |
| 2600 | + | |
| 2601 | + | |
2600 | 2602 | | |
2601 | | - | |
2602 | | - | |
| 2603 | + | |
| 2604 | + | |
2603 | 2605 | | |
2604 | 2606 | | |
2605 | 2607 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
tests/data/expected/main/jsonschema/all_exports_hyphenated_directory/hyphenated_directory/order.py
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1288 | 1288 | | |
1289 | 1289 | | |
1290 | 1290 | | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
1291 | 1306 | | |
1292 | 1307 | | |
1293 | 1308 | | |
| |||
0 commit comments