Feat: --known-enum-bases option to support custom enum-like base cl…#3513
Feat: --known-enum-bases option to support custom enum-like base cl…#3513sobolevn merged 3 commits intowemake-services:masterfrom imtoopunkforyou:issues/3497
--known-enum-bases option to support custom enum-like base cl…#3513Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3513 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 363 363
Lines 12033 12071 +38
Branches 820 823 +3
=========================================
+ Hits 12033 12071 +38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@CodiumAI-Agent /improve |
PR Code Suggestions ✨Latest suggestions up to f13641b
Previous suggestionsSuggestions up to commit f13641b
Suggestions up to commit f13641b
Suggestions up to commit 2fdedc7
|
| options, | ||
| ): | ||
| """Testing that custom enum base classes work with configuration.""" | ||
| code = """ |
There was a problem hiding this comment.
we define examples on a module level
sobolevn
left a comment
There was a problem hiding this comment.
Please, also don't forget to add new configuration option to the related violations docs.
| normalized: tuple[str, ...] = tuple({ | ||
| name for base in enum_bases for name in (base, base.split('.')[-1]) | ||
| }) | ||
| return _has_one_of_base_classes(defn, normalized) |
There was a problem hiding this comment.
| normalized: tuple[str, ...] = tuple({ | |
| name for base in enum_bases for name in (base, base.split('.')[-1]) | |
| }) | |
| return _has_one_of_base_classes(defn, normalized) | |
| return _has_one_of_base_classes( | |
| defn, | |
| tuple({ | |
| name | |
| for base in enum_bases | |
| for name in (base, base.split('.')[-1]) | |
| }), | |
| ) |
There was a problem hiding this comment.
: tuple[str, ...] annotation looks suspicious :)
There was a problem hiding this comment.
I'll fix it next week.
oh, yes, okay. I'll add it in a week |
sobolevn
left a comment
There was a problem hiding this comment.
I want to make a release, with this feature in it :)
You can address issues in the follow-up PR, since they are minor.
I'll create a new PR with a link to this one as soon as I make the changes. |
Checklist
CHANGELOG.mdRelated issues