diff --git a/pgtoolkit/_helpers.py b/pgtoolkit/_helpers.py index 32b77e3..01ae2b9 100644 --- a/pgtoolkit/_helpers.py +++ b/pgtoolkit/_helpers.py @@ -53,23 +53,21 @@ def __exit__(self, *a: Any) -> None: @overload -def open_or_return(fo_or_path: None, mode: str = "r") -> NoReturn: - ... +def open_or_return(fo_or_path: None, mode: str = "r") -> NoReturn: ... @overload -def open_or_return(fo_or_path: str, mode: str = "r") -> IO[str]: - ... +def open_or_return(fo_or_path: str, mode: str = "r") -> IO[str]: ... @overload -def open_or_return(fo_or_path: Path, mode: str = "r") -> IO[str]: - ... +def open_or_return(fo_or_path: Path, mode: str = "r") -> IO[str]: ... @overload -def open_or_return(fo_or_path: IO[str], mode: str = "r") -> PassthroughManager[IO[str]]: - ... +def open_or_return( + fo_or_path: IO[str], mode: str = "r" +) -> PassthroughManager[IO[str]]: ... def open_or_return( diff --git a/pgtoolkit/conf.py b/pgtoolkit/conf.py index 224b206..a141cb8 100644 --- a/pgtoolkit/conf.py +++ b/pgtoolkit/conf.py @@ -38,7 +38,6 @@ """ - import contextlib import copy import enum @@ -462,6 +461,7 @@ class Configuration: .. automethod:: save """ # noqa + lines: list[str] entries: dict[str, Entry] path: Optional[str] diff --git a/pgtoolkit/ctl.py b/pgtoolkit/ctl.py index 8d0f580..9c7830c 100644 --- a/pgtoolkit/ctl.py +++ b/pgtoolkit/ctl.py @@ -51,8 +51,7 @@ def __call__( capture_output: bool = False, check: bool = False, **kwargs: Any, - ) -> CompletedProcess: - ... + ) -> CompletedProcess: ... class AsyncCommandRunner(Protocol): @@ -71,8 +70,7 @@ async def __call__( capture_output: bool = False, check: bool = False, **kwargs: Any, - ) -> CompletedProcess: - ... + ) -> CompletedProcess: ... def run_command( diff --git a/pgtoolkit/service.py b/pgtoolkit/service.py index 5213eb6..0b1dbd3 100644 --- a/pgtoolkit/service.py +++ b/pgtoolkit/service.py @@ -88,7 +88,6 @@ """ - import os import sys from collections.abc import Iterable, MutableMapping diff --git a/requirements-ci.txt b/requirements-ci.txt index 739052c..899ecf0 100644 --- a/requirements-ci.txt +++ b/requirements-ci.txt @@ -1,4 +1,4 @@ -black>=23.1.0 +black>=24.2.0 check-manifest codecov docutils diff --git a/setup.cfg b/setup.cfg index 8e99ed4..0c0a211 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,6 +11,8 @@ ignore = E501, # missing whitespace around arithmetic operator E226, + # multiple statements on one line (def) + E704, # line break before binary operator W503,