-
Notifications
You must be signed in to change notification settings - Fork 858
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
Mypy fixes #5733
Mypy fixes #5733
Conversation
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.
Left one nit. Also, where did you remove from the override list?
Remove those modeles from the override list.
bec9cf0
to
33d2bf7
Compare
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.
One inline question and I think we should be preferring List
until 3.9.
@@ -654,7 +654,7 @@ def dhcp_discovery( | |||
if is_ib_interface(interface): | |||
infiniband_argument = ["--clientid"] | |||
command = [ | |||
self.dhcp_client_path, # pyright: ignore | |||
self.client_name, |
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.
Would it be better to update the constructor so that the path can only have a string?
E.g., instead of
def __init__(self):
self.dhcp_client_path = subp.which(self.client_name)
if not self.dhcp_client_path:
raise NoDHCPLeaseMissingDhclientError()
do something like
def __init__(self):
dhcp_client_path = subp.which(self.client_name)
if not dhcp_client_path:
raise NoDHCPLeaseMissingDhclientError()
self.dhcp_client_path = dhcp_client_path
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.
Would it be better to update the constructor so that the path can only have a string?
I'm fine with checking in __init__()
, but passing absolute paths to subp
isn't necessary and makes the logged commands more noisy to read.
Why? What we would gain by preferring the deprecated version? This is forwards compatible and cloud-init's codebase uses |
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.
LGTM
Proposed Commit Message
Test Steps
See CI coverage
Merge type