Refactor sub scvar#48
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
==========================================
+ Coverage 88.35% 88.94% +0.59%
==========================================
Files 16 16
Lines 601 606 +5
==========================================
+ Hits 531 539 +8
+ Misses 70 67 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
I would propose to use from enum import Enum, auto
class Scale(Enum):
REN = auto()
FACT = auto()
@click.argument(
"scale",
metavar="SCALE",
type=click.Choice(list(map(lambda x: x.name.lower(), Scale)), case_sensitive=False),
)
...It is more explicit, and may give more introspection in debugging. |
Do you mean something similar to what I have done in the last commit? |
Similar yes, but we can still improve: I added a bunch of comments. I trust that is working, but since our code is growing, I'm trying to focus on improving the quality, to make it more maintainable (just because we're scaling, and trying to stabilize our infrastructure). |
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
|
Ok thank you @alecandido for the suggestions, this should be fine now |
|
I think we can merge. Thanks for this! |
No description provided.