Support aliases in get_specialized_type_var_map#3766
Conversation
Reviewer's Guide by SourceryThis pull request introduces support for TypeVar passthrough in Class diagram showing generic type inheritance exampleclassDiagram
class Foo~T~{
+Generic[T]
}
class Bar~K~{
+Generic[K]
}
class Bin{
}
Foo <|-- Bar: Foo[K]
Bar <|-- Bin: Bar[int]
note for Bin "Resolves type variables:
_T = int
_K = int"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @alexey-pelykh - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding inline documentation for the type variable resolution loop to explain the algorithm for future maintainers.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
76e2406 to
f1d079e
Compare
f1d079e to
025e667
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3766 +/- ##
==========================================
- Coverage 97.27% 97.24% -0.03%
==========================================
Files 504 502 -2
Lines 33480 33481 +1
Branches 5502 1714 -3788
==========================================
- Hits 32566 32558 -8
- Misses 703 706 +3
- Partials 211 217 +6 |
CodSpeed Performance ReportMerging #3766 will not alter performanceComparing Summary
|
6b63ed0 to
1bb557c
Compare
d11b857 to
44b7973
Compare
| get_args, | ||
| get_origin, | ||
| ) | ||
| from typing_extensions import get_args |
There was a problem hiding this comment.
get_args lives in typing since Python 3.8
ecb3c9e to
dadabc5
Compare
bellini666
left a comment
There was a problem hiding this comment.
Just one small adjustment and it should be good to go! 😊
dadabc5 to
4934eb5
Compare

Description
Support aliases (TypeVar passthrough) in
get_specialized_type_var_map:Without this change, errors like
will appear
Types of Changes
Checklist
Summary by Sourcery
Support TypeVar passthrough in
get_specialized_type_var_map.Enhancements:
Tests: