Skip to content

Commit

Permalink
Consolidate imports in test_resolvers.py
Browse files Browse the repository at this point in the history
This does not need two separate `if TYPE_CHECKING` blocks, splitting
the imports across two sections.
  • Loading branch information
pradyunsg committed Dec 9, 2023
1 parent 995ed67 commit c1bc75e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/test_resolvers.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from __future__ import annotations

from collections import namedtuple
from typing import TYPE_CHECKING, Any, Iterator, Sequence, Tuple

if TYPE_CHECKING:
from typing import Iterable, Mapping

import pytest
from packaging.requirements import Requirement
from packaging.version import Version
Expand All @@ -16,18 +14,17 @@
ResolutionImpossible,
Resolver,
)
from resolvelib.resolvers import Resolution

if TYPE_CHECKING:
from typing import Iterable, Mapping

from resolvelib.resolvers import (
Criterion,
RequirementInformation,
RequirementsConflicted,
)

from collections import namedtuple

from resolvelib.resolvers import Resolution


def test_candidate_inconsistent_error():
requirement = "foo"
Expand Down

0 comments on commit c1bc75e

Please sign in to comment.