Commit ff7ef94
authored
fix: improve type resolution for model field declarations (#2216)
* fix: improve type resolution for model field declarations
* Updated model field declarations to resolve to their concrete types (e.g., `CharField[str]`) in Pyright/Pylance, enhancing type-checking accuracy.
* Modified the `Field.__new__` type-check stub to return `Self`, improving type inference.
This change addresses type-checking issues and improves developer experience with IDEs.
* Update CHANGELOG with reference to the issue1 parent cd2e9fe commit ff7ef94
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
202 | 204 | | |
203 | 205 | | |
204 | 206 | | |
205 | | - | |
| 207 | + | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| |||
0 commit comments