ruff
ruff copied to clipboard
[redknot] add module type and attribute lookup for some types
- Add a module type,
ModuleTypeId - Add an attribute lookup method
get_memberforType- Only implemented for
ModuleTypeIdandClassTypeId - [ ] Should this be a trait?
- [ ] Uses
unwrap, but we should remove that. Maybe add a new variant toQueryError?
- Only implemented for
- Add
infer_definition_typecase forImport - Add
infer_expr_typecase forAttribute - Add a test to exercise these
- [ ] remove all NOTE/FIXME/TODO after discussing with reviewers
ruff-ecosystem results
Linter (stable)
✅ ecosystem check detected no linter changes.
Linter (preview)
✅ ecosystem check detected no linter changes.
Since you folks were ooo, I added questions that I had as NOTE/TODO/FIXME comments in the diff.
Thanks for your review. I've made requested changes and asked some questions to describe the follow-up work in comments. Let me know when/if it's ok to merge.
Oh there are a couple clippy issues to fix, too.
Looks like you could easily support AnnotatedAssignment the same as Assignment for now (with a TODO to actually look at the annotation) and our Definition handling would cover all variants?
- Clippy: rename an unused variable which we'll use after completing the
get_membercase for unions - Added case to
infer_definition_typeforAnnotatedAssignmentvariant which returnsType::Unknownwhen the value isn't present; includes a TODO to look at the annotation (which presumably will have a type expression)
Oh weird. ~~Maybe the CI-clippy is getting some stricter options than my local one.~~[Edit: No, I just forgot to run it] Ty