-
-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(imp) support aliases in get_specialized_type_var_map #3766
base: main
Are you sure you want to change the base?
(imp) 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_origin, | ||
) | ||
from typing_extensions import get_args |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_args
lives in typing since Python 3.8
44b7973
to
ecb3c9e
Compare
ecb3c9e
to
dadabc5
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: