-
Notifications
You must be signed in to change notification settings - Fork 32
Typing args
(initial)
#418
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: develop
Are you sure you want to change the base?
Conversation
] | ||
|
||
|
||
class StorageAttachArgs(ClusterConfig): |
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.
StorageAttachArgs and StorageCreateArgs share many fields. Can we move them to new, shared class?
from typing import Any | ||
|
||
|
||
def apply_args(main_args: Namespace, annotation: Any) -> Any: |
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.
Bad naming imo. What does apply_args mean?
|
||
|
||
def apply_args(main_args: Namespace, annotation: Any) -> Any: | ||
args = annotation() |
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.
There is no information that annotation is callable. Please add docstring for this function
mount_options: Optional[str] = 'implicit-dirs' | ||
|
||
|
||
class StorageCreateArgs(ClusterConfig): |
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.
Maybe it should be dataclass? If I want to test StorageCreate command in unit tests(in the future) and I want to pass StorageCreateArgs, is there any way to pass them via constructor?
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.
] # The project name lives on the last line of the output | ||
|
||
|
||
def get_zone(): |
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.
This are general functions, not specific to args. Maybe they should be moved to utils?
Fixes / Features
args
parameter