Skip to content

Commit

Permalink
chore: get rid of some unneeded noqas in the code
Browse files Browse the repository at this point in the history
Signed-off-by: Renan Rodrigo <[email protected]>
  • Loading branch information
renanrodrigo committed Jun 28, 2024
1 parent 741ec61 commit 7fcf03f
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 20 deletions.
1 change: 0 additions & 1 deletion features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from typing import Dict, List, Optional, Tuple, Union # noqa: F401

import paramiko
import pycloudlib # type: ignore # noqa: F401
import yaml
from behave.model import Feature, Scenario
from behave.model_core import Status
Expand Down
3 changes: 1 addition & 2 deletions uaclient/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
import re
import shutil
from typing import List, Optional # noqa: F401
from typing import List, Optional

from uaclient import (
api,
Expand All @@ -21,7 +21,6 @@
from uaclient import messages, secret_manager
from uaclient import status as ua_status
from uaclient import system, timer, util
from uaclient.clouds import AutoAttachCloudInstance # noqa: F401
from uaclient.defaults import (
APPARMOR_PROFILES,
CLOUD_BUILD_INFO,
Expand Down
2 changes: 1 addition & 1 deletion uaclient/api/u/pro/security/fix/_common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import enum
import socket
from collections import defaultdict
from typing import Any, Dict, List, NamedTuple, Optional, Tuple # noqa: F401
from typing import Any, Dict, List, NamedTuple, Optional, Tuple

from uaclient import apt, exceptions, livepatch, messages, system, util
from uaclient.http import serviceclient
Expand Down
12 changes: 6 additions & 6 deletions uaclient/cli/tests/test_cli_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ class TestExecuteFixPlan:
{check} USN-### does not affect your system.
""".format(
check=messages.OKGREEN_CHECK # noqa: E126
) # noqa: E126
check=messages.OKGREEN_CHECK
)
),
FixStatus.SYSTEM_NOT_AFFECTED,
[],
Expand Down Expand Up @@ -331,8 +331,8 @@ class TestExecuteFixPlan:
{check} USN-### is resolved.
""".format(
check=messages.OKGREEN_CHECK # noqa: E126
) # noqa: E126
check=messages.OKGREEN_CHECK
)
),
FixStatus.SYSTEM_NON_VULNERABLE,
[],
Expand Down Expand Up @@ -1727,8 +1727,8 @@ def test_execute_fix_plan_when_subscription_is_expired(
{check} USN-### does not affect your system.
""".format(
check=messages.OKGREEN_CHECK # noqa: E126
) # noqa: E126
check=messages.OKGREEN_CHECK
)
),
FixStatus.SYSTEM_NOT_AFFECTED,
[],
Expand Down
4 changes: 2 additions & 2 deletions uaclient/entitlements/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import enum
import textwrap
from collections import defaultdict
from typing import Dict, List, NamedTuple, Optional, Tuple, Type # noqa: F401
from typing import Dict, List, Optional, Type

from uaclient import exceptions
from uaclient.config import UAConfig
from uaclient.entitlements import fips
from uaclient.entitlements.anbox import AnboxEntitlement
from uaclient.entitlements.base import UAEntitlement # noqa: F401
from uaclient.entitlements.base import UAEntitlement
from uaclient.entitlements.cc import CommonCriteriaEntitlement
from uaclient.entitlements.cis import CISEntitlement
from uaclient.entitlements.entitlement_status import ApplicabilityStatus
Expand Down
2 changes: 1 addition & 1 deletion uaclient/entitlements/fips.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import re
from itertools import groupby
from typing import Callable, List, Optional, Tuple, Union # noqa: F401
from typing import List, Optional, Tuple

from uaclient import api, apt, event_logger, exceptions, messages, system, util
from uaclient.clouds.identity import NoCloudTypeReason, get_cloud_type
Expand Down
2 changes: 1 addition & 1 deletion uaclient/entitlements/realtime.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from typing import Any, Dict, Optional, Tuple, Type # noqa: F401
from typing import Any, Dict, Optional, Tuple, Type

from uaclient import apt, event_logger, messages, system, util
from uaclient.entitlements import repo
Expand Down
2 changes: 1 addition & 1 deletion uaclient/entitlements/ros.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Tuple, Type # noqa: F401
from typing import Tuple, Type

from uaclient import messages
from uaclient.entitlements import repo
Expand Down
2 changes: 1 addition & 1 deletion uaclient/files/files.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import logging
import os
from typing import Any, Dict, Optional # noqa: F401
from typing import Any, Dict, Optional

from uaclient import defaults, event_logger, exceptions, system, util

Expand Down
2 changes: 1 addition & 1 deletion uaclient/files/machine_token.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from datetime import datetime
from typing import Any, Dict, Optional # noqa: F401
from typing import Any, Dict, Optional

from uaclient import defaults, exceptions, system, util
from uaclient.contract_data_types import PublicMachineTokenData
Expand Down
2 changes: 1 addition & 1 deletion uaclient/messages/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
from gettext import NullTranslations, translation
from typing import Callable, Dict, Optional # noqa: F401
from typing import Callable, Dict, Optional

from uaclient.messages import urls

Expand Down
3 changes: 2 additions & 1 deletion uaclient/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def _get_kernel_changelog_timestamp(
) -> Optional[datetime.datetime]:
if is_container():
LOG.warning(
"Not attempting to use timestamp of kernel changelog because we're in a container" # noqa: E501
"Not attempting to use timestamp of kernel "
"changelog because we're in a container"
)
return None

Expand Down
2 changes: 1 addition & 1 deletion uaclient/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import textwrap
import time
from functools import wraps
from typing import Any, Callable, Dict, List, Optional, Union # noqa: F401
from typing import Any, Dict, List, Optional, Union # noqa: F401

from uaclient import exceptions, messages
from uaclient.defaults import CONFIG_FIELD_ENVVAR_ALLOWLIST
Expand Down

0 comments on commit 7fcf03f

Please sign in to comment.