Skip to content

Commit

Permalink
Clean up unused imports / extra f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Feb 23, 2023
1 parent f61b346 commit f3afd08
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions irrd/updates/handler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import textwrap
from collections import defaultdict
from typing import List, Optional, Dict, Any, Union
from typing import List, Optional, Dict, Union

from ordered_set import OrderedSet

Expand All @@ -11,7 +11,7 @@
from irrd.storage.queries import RPSLDatabaseQuery
from irrd.utils import email
from .parser import parse_change_requests, ChangeRequest, SuspensionRequest
from .parser_state import SuspensionRequestType, UpdateRequestStatus, UpdateRequestType
from .parser_state import UpdateRequestStatus, UpdateRequestType
from .validators import ReferenceValidator, AuthValidator
from ..utils.validators import RPSLChangeSubmission, RPSLSuspensionSubmission

Expand Down
5 changes: 2 additions & 3 deletions irrd/updates/tests/test_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from irrd.storage.models import JournalEntryOrigin
from irrd.utils.rpsl_samples import SAMPLE_MNTNER
from irrd.utils.test_utils import flatten_mock_calls
from irrd.updates.parser import parse_change_requests
from ..handler import ChangeSubmissionHandler
from ...utils.validators import RPSLChangeSubmission, RPSLSuspensionSubmission
from ..parser_state import SuspensionRequestType
Expand Down Expand Up @@ -200,7 +199,7 @@ def test_parse_valid_new_person_existing_mntner_pgp_key(self, prepare_mocks):
assert mock_dh.mock_calls[2][0] == 'commit'
assert mock_dh.mock_calls[3][0] == 'close'

assert handler.submitter_report_human() == textwrap.dedent(f"""
assert handler.submitter_report_human() == textwrap.dedent("""
> Message-ID: test
> From: [email protected]
Expand Down Expand Up @@ -229,7 +228,7 @@ def test_parse_valid_new_person_existing_mntner_pgp_key(self, prepare_mocks):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
""")

expected_notification = textwrap.dedent(f"""
expected_notification = textwrap.dedent("""
This is to notify you of changes in the TEST database
or object authorisation failures.
Expand Down
3 changes: 1 addition & 2 deletions irrd/updates/tests/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import itertools
import passlib.hash
import textwrap
from unittest.mock import Mock

Expand All @@ -16,7 +15,7 @@
SAMPLE_ROUTE, SAMPLE_ROUTE6
from irrd.utils.test_utils import flatten_mock_calls
from irrd.utils.text import splitline_unicodesafe
from irrd.updates.suspension import reactivate_for_mntner, suspend_for_mntner
from irrd.updates.suspension import suspend_for_mntner
from ..parser import parse_change_requests
from ..parser_state import SuspensionRequestType, UpdateRequestType, UpdateRequestStatus
from ..validators import ReferenceValidator, AuthValidator, RulesValidator, ValidatorResult
Expand Down
1 change: 0 additions & 1 deletion irrd/updates/tests/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from unittest.mock import Mock

import pytest
from pytest import raises

from irrd.conf import AUTH_SET_CREATION_COMMON_KEY
from irrd.rpsl.rpsl_objects import rpsl_object_from_text
Expand Down

0 comments on commit f3afd08

Please sign in to comment.