Skip to content

Commit

Permalink
make reformat
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <[email protected]>
  • Loading branch information
woodruffw committed Oct 22, 2024
1 parent 9fbd421 commit 7e64b12
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pip_audit/_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from __future__ import annotations

import logging
from collections.abc import Iterator
from dataclasses import dataclass
from typing import Iterator

from pip_audit._dependency_source import DependencySource
from pip_audit._service import Dependency, VulnerabilityResult, VulnerabilityService
Expand Down
3 changes: 2 additions & 1 deletion pip_audit/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
import logging
import os
import sys
from collections.abc import Iterator
from contextlib import ExitStack, contextmanager
from pathlib import Path
from typing import IO, Iterator, NoReturn, cast
from typing import IO, NoReturn, cast

from pip_audit import __version__
from pip_audit._audit import AuditOptions, Auditor
Expand Down
2 changes: 1 addition & 1 deletion pip_audit/_dependency_source/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from __future__ import annotations

from abc import ABC, abstractmethod
from typing import Iterator
from collections.abc import Iterator

from pip_audit._fix import ResolvedFixVersion
from pip_audit._service import Dependency
Expand Down
2 changes: 1 addition & 1 deletion pip_audit/_dependency_source/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import os
import subprocess
import sys
from collections.abc import Iterator, Sequence
from pathlib import Path
from typing import Iterator, Sequence

import pip_api
from packaging.version import InvalidVersion, Version
Expand Down
9 changes: 5 additions & 4 deletions pip_audit/_dependency_source/pyproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import logging
import os
from collections.abc import Iterator
from pathlib import Path
from tempfile import NamedTemporaryFile, TemporaryDirectory
from typing import Iterator

import toml
from packaging.requirements import Requirement
Expand Down Expand Up @@ -81,9 +81,10 @@ def collect(self) -> Iterator[Dependency]:
# dependency resolution now, we can think about doing `pip install <local-project-dir>`
# regardless of whether the project has a `pyproject.toml` or not. And if it doesn't
# have a `pyproject.toml`, we can raise an error if the user provides `--fix`.
with TemporaryDirectory() as ve_dir, NamedTemporaryFile(
dir=ve_dir, delete=False
) as req_file:
with (
TemporaryDirectory() as ve_dir,
NamedTemporaryFile(dir=ve_dir, delete=False) as req_file,
):
# We use delete=False in creating the tempfile to allow it to be
# closed and opened multiple times within the context scope on
# windows, see GitHub issue #646.
Expand Down
3 changes: 2 additions & 1 deletion pip_audit/_dependency_source/requirement.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
import logging
import re
import shutil
from collections.abc import Iterator
from contextlib import ExitStack
from pathlib import Path
from tempfile import NamedTemporaryFile, TemporaryDirectory
from typing import IO, Iterator
from typing import IO

from packaging.specifiers import SpecifierSet
from packaging.utils import canonicalize_name
Expand Down
3 changes: 2 additions & 1 deletion pip_audit/_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
from __future__ import annotations

import logging
from collections.abc import Iterator
from dataclasses import dataclass
from typing import Any, Iterator, cast
from typing import Any, cast

from packaging.version import Version

Expand Down
3 changes: 2 additions & 1 deletion pip_audit/_format/columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

from __future__ import annotations

from collections.abc import Iterable
from itertools import zip_longest
from typing import Any, Iterable, cast
from typing import Any, cast

from packaging.version import Version

Expand Down
3 changes: 2 additions & 1 deletion pip_audit/_service/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
from __future__ import annotations

from abc import ABC, abstractmethod
from collections.abc import Iterator
from dataclasses import dataclass, replace
from datetime import datetime
from typing import Any, Iterator, NewType
from typing import Any, NewType

from packaging.utils import canonicalize_name
from packaging.version import Version
Expand Down
3 changes: 2 additions & 1 deletion pip_audit/_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

import logging
from abc import ABC, abstractmethod
from collections.abc import Sequence
from logging.handlers import MemoryHandler
from typing import Any, Sequence
from typing import Any

from rich.align import StyleType
from rich.console import Console, Group, RenderableType
Expand Down
2 changes: 1 addition & 1 deletion pip_audit/_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import os.path
import subprocess
from collections.abc import Sequence
from subprocess import Popen
from typing import Sequence

from ._state import AuditState

Expand Down
2 changes: 1 addition & 1 deletion pip_audit/_virtual_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import json
import logging
import venv
from collections.abc import Iterator
from os import PathLike
from tempfile import NamedTemporaryFile, TemporaryDirectory, gettempdir
from types import SimpleNamespace
from typing import Iterator

from packaging.version import Version

Expand Down

0 comments on commit 7e64b12

Please sign in to comment.