-
Notifications
You must be signed in to change notification settings - Fork 5
validate hinted attributes on subcontrollers #209
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #209 +/- ##
==========================================
+ Coverage 88.59% 88.62% +0.03%
==========================================
Files 44 44
Lines 2253 2259 +6
==========================================
+ Hits 1996 2002 +6
Misses 257 257 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
We're currently not checking for non generic alias types e.g. Might also be good to validate hinted subcontrollers, though I guess they're not usually dot-accessed. e: pushed something, setting as draft until I fix some logic with how hinting as an Attribute should work |
dcd79d6 to
ac94896
Compare
b50ee48 to
6a666e1
Compare
6a666e1 to
2ca1bb8
Compare
Co-authored-by: Gary Yendell <[email protected]>
46868c2 to
3ccbe0f
Compare
| if attr_class is not type(attr): | ||
| # skip validation if access mode not specified | ||
| if attr_class is Attribute and isinstance(attr, Attribute): | ||
| continue |
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.
Is this so that the hint can just be Attribute? I am not sure if that is a reasonable thing to do. If you are adding the hint presumably you intend to either read or write it.
Oversight from #187