]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
style: fix up with current version of black
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 21 Feb 2025 18:01:36 +0000 (19:01 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 21 Feb 2025 18:03:52 +0000 (19:03 +0100)
docs/lib/sql_role.py
docs/lib/ticket_role.py
tests/_test_cursor.py
tests/typing_example.py
tools/bump_version.py
tools/update_backer.py
tools/update_error_prefixes.py

index a40c9f40419bf3ff3f4107989e7cd7f7b217572f..c9cca121735ac1a24ec2418dcc51f70d7d5c7a7c 100644 (file)
@@ -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
index 24ec873d89d0a6343363592b7524e5b68a988620..3f8a81204b2a77deb213a1cf1c215be66163dd48 100644 (file)
@@ -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
index 4f773bea450256497ace13ffcd7e3ace5d7637de..51fff9ad1bff40aed6cd71559a868ff30e450b37 100644 (file)
@@ -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]
index a26ca49b49e2928b7538420c2de5c94553287ab7..f429512da7853c73ef07fd22cf05529083a5a3ac 100644 (file)
@@ -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
 
index dd371d7ba3bda1410b1b3f85966d0977c4790644..9b6fc27f4f7b70c06d9ccecb4141726f6a8b9fbf 100755 (executable)
@@ -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
 
index 00885276d3250564fb5744d394c8daeca3ed17d2..50230883395313bd4817769157de05a89952a9e8 100755 (executable)
@@ -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
index af63ae2409c7553d946fd75e3c2344b926272389..52ba2cb351016099e8166c1e257b0ab1d4f44da9 100755 (executable)
@@ -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