Skip to content
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

chore: fix type annotations #198

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import json
import logging
from pprint import pprint
import typing
import uuid
from pprint import pprint

import neutron_lib.api.definitions.portbindings as portbindings
from neutron_lib import constants as p_const
Expand All @@ -11,9 +10,10 @@
from neutron_lib.plugins.ml2.api import NetworkContext
from neutron_lib.plugins.ml2.api import PortContext
from neutron_lib.plugins.ml2.api import SubnetContext
from neutron_understack.argo.workflows import ArgoClient
from oslo_config import cfg

from neutron_understack.argo.workflows import ArgoClient

LOG = logging.getLogger(__name__)


Expand Down Expand Up @@ -42,7 +42,8 @@ def setup_conf():
cfg.IntOpt(
"argo_max_attempts",
default=15,
help="Number of tries to retrieve the Workflow run result. Sleeps 5 seconds between attempts.",
help="Number of tries to retrieve the Workflow run result. "
"Sleeps 5 seconds between attempts.",
),
cfg.BoolOpt(
"argo_dry_run", default=True, help="Call Undersync with dry-run mode"
Expand All @@ -68,7 +69,7 @@ def setup_conf():


def dump_context(
context: typing.Union[NetworkContext, SubnetContext, PortContext],
context: NetworkContext | SubnetContext | PortContext,
) -> dict:
# RESOURCE_ATTRIBUTE_MAP
# from neutron_lib.api.definitions import network, subnet, port, portbindings
Expand Down Expand Up @@ -127,7 +128,6 @@ def dump_context(


def log_call(
method: str, context: typing.Union[NetworkContext, SubnetContext, PortContext]
method: str, context: NetworkContext | SubnetContext | PortContext
) -> None:
data = dump_context(context)
Expand Down
Loading