When changing code, prioritize readable structure that also passes linters with minimal formatting churn:
has_gateway, normalized auth) so the final if is simple.os.path.join(_dirpath, file)), not the root.argument_context(...) and only specify unique parameters in child contexts.Example (condition simplification):
_normalize_shared_key_fields(namespace)
has_gateway = any([namespace.local_gateway2, namespace.vnet_gateway2])
auth = (getattr(namespace, 'auth_type', '') or '').strip().lower()
if has_gateway and not (namespace.shared_key or auth == 'certificate'):
...
Example (minimal, linter-safe line formatting):
response_body = _check_runtimestatus_with_deploymentstatusapi(
cmd, resource_group_name, name, slot,
deployment_status_url, is_async=True,
timeout=timeout,
)
Example (directory walk correctness):
for _dirpath, _dirnames, files in os.walk(src_path):
for file in files:
if fnmatch.fnmatch(file, "*.html"):
static_html_file = os.path.join(_dirpath, file)
break