From: Daniele Varrazzo Date: Fri, 21 Feb 2025 18:01:36 +0000 (+0100) Subject: style: fix up with current version of black X-Git-Tag: pool-3.2.5~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29f3d0499f833d0fcb7beda6c55b5193d96b9122;p=thirdparty%2Fpsycopg.git style: fix up with current version of black --- diff --git a/docs/lib/sql_role.py b/docs/lib/sql_role.py index a40c9f404..c9cca1217 100644 --- a/docs/lib/sql_role.py +++ b/docs/lib/sql_role.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- """ - sql role - ~~~~~~~~ +sql role +~~~~~~~~ - An interpreted text role to style SQL syntax in Psycopg documentation. +An interpreted text role to style SQL syntax in Psycopg documentation. - :copyright: Copyright 2010 by Daniele Varrazzo. - :copyright: Copyright 2020 The Psycopg Team. +:copyright: Copyright 2010 by Daniele Varrazzo. +:copyright: Copyright 2020 The Psycopg Team. """ from docutils import nodes, utils diff --git a/docs/lib/ticket_role.py b/docs/lib/ticket_role.py index 24ec873d8..3f8a81204 100644 --- a/docs/lib/ticket_role.py +++ b/docs/lib/ticket_role.py @@ -1,12 +1,12 @@ # type: ignore """ - ticket role - ~~~~~~~~~~~ +ticket role +~~~~~~~~~~~ - An interpreted text role to link docs to tickets issues. +An interpreted text role to link docs to tickets issues. - :copyright: Copyright 2013 by Daniele Varrazzo. - :copyright: Copyright 2021 The Psycopg Team +:copyright: Copyright 2013 by Daniele Varrazzo. +:copyright: Copyright 2021 The Psycopg Team """ import re diff --git a/tests/_test_cursor.py b/tests/_test_cursor.py index 4f773bea4..51fff9ad1 100644 --- a/tests/_test_cursor.py +++ b/tests/_test_cursor.py @@ -47,7 +47,7 @@ def ph(cur: Any, query: str) -> str: def my_row_factory( - cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]] + cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]], ) -> RowMaker[List[str]]: if cursor.description is not None: titles = [c.name for c in cursor.description] diff --git a/tests/typing_example.py b/tests/typing_example.py index a26ca49b4..f429512da 100644 --- a/tests/typing_example.py +++ b/tests/typing_example.py @@ -10,7 +10,7 @@ from psycopg import AsyncConnection, AsyncCursor, AsyncServerCursor def int_row_factory( - cursor: Union[Cursor[Any], AsyncCursor[Any]] + cursor: Union[Cursor[Any], AsyncCursor[Any]], ) -> Callable[[Sequence[int]], int]: return lambda values: values[0] if values else 42 diff --git a/tools/bump_version.py b/tools/bump_version.py index dd371d7ba..9b6fc27f4 100755 --- a/tools/bump_version.py +++ b/tools/bump_version.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -"""Bump the version number of the project. -""" +"""Bump the version number of the project.""" from __future__ import annotations diff --git a/tools/update_backer.py b/tools/update_backer.py index 00885276d..502308833 100755 --- a/tools/update_backer.py +++ b/tools/update_backer.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 -r"""Add or edit github users in the backers file -""" +r"""Add or edit github users in the backers file""" import sys import logging diff --git a/tools/update_error_prefixes.py b/tools/update_error_prefixes.py index af63ae240..52ba2cb35 100755 --- a/tools/update_error_prefixes.py +++ b/tools/update_error_prefixes.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -"""Find the error prefixes in various l10n used for precise prefixstripping. -""" +"""Find the error prefixes in various l10n used for precise prefixstripping.""" import re import logging