Skip to content

Commit 550f882

Browse files
committed
Update black formatting
1 parent 5628ae1 commit 550f882

File tree

16 files changed

+38
-37
lines changed

16 files changed

+38
-37
lines changed

scripts/bundle_fa_subset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ def bad_options(message: str) -> typing.NoReturn:
176176
ExistingFileOrDir = click.Path(
177177
dir_okay=True, file_okay=True, exists=True, path_type=pathlib.Path
178178
) # type: ignore
179-
FA_VERSION_TEMPLATE: typing.Final[
180-
str
181-
] = "https://use.fontawesome.com/releases/v{version}/fontawesome-free-{version}-web.zip"
179+
FA_VERSION_TEMPLATE: typing.Final[str] = (
180+
"https://use.fontawesome.com/releases/v{version}/fontawesome-free-{version}-web.zip"
181+
)
182182
LATEST_FA_VERSION: typing.Final[str] = "6.2.0"
183183

184184

src/audio_feeder/_db_types.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
This exists for compatibility while the old database_handler code still exists.
44
"""
5+
56
import typing
67

78
from ._object_types import ID, SchemaObject
@@ -16,17 +17,12 @@
1617

1718
# pragma: nocover
1819
class DatabaseHandler(typing.Protocol):
19-
def __init__(self, db_loc: PathType):
20-
...
20+
def __init__(self, db_loc: PathType): ...
2121

22-
def save_table(self, table_name: TableName, table_contents: Table) -> None:
23-
...
22+
def save_table(self, table_name: TableName, table_contents: Table) -> None: ...
2423

25-
def load_table(self, table_name: TableName) -> Table:
26-
...
24+
def load_table(self, table_name: TableName) -> Table: ...
2725

28-
def save_database(self, database: Database) -> None:
29-
...
26+
def save_database(self, database: Database) -> None: ...
3027

31-
def load_database(self) -> Database:
32-
...
28+
def load_database(self) -> Database: ...

src/audio_feeder/_object_types.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This is partially to allow typing without circular imports and partially to
44
allow typing on the generated schema types.
55
"""
6+
67
import typing
78

89
from ._compat import Self
@@ -15,13 +16,11 @@
1516
class SchemaObject(typing.Protocol):
1617
id: ID
1718

18-
def to_dict(self) -> typing.Mapping[str, typing.Any]:
19-
...
19+
def to_dict(self) -> typing.Mapping[str, typing.Any]: ...
2020

2121
def to_dict_sparse(
2222
self, *, _filter: typing.Callable = ...
23-
) -> typing.Mapping[str, typing.Any]:
24-
...
23+
) -> typing.Mapping[str, typing.Any]: ...
2524

2625
def copy(self: Self) -> Self:
2726
"""Make a new copy of this object."""

src/audio_feeder/cache_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Functions useful for caching.
33
"""
4+
45
import functools
56
import typing
67

src/audio_feeder/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Command line scripts
33
"""
4+
45
import pathlib
56

67
import click

src/audio_feeder/config.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Configuration manager - handles the application's global configuration.
33
"""
4+
45
import base64
56
import functools
67
import graphlib
@@ -64,13 +65,11 @@ class TemplateStr(str):
6465

6566

6667
@typing.overload
67-
def _path_converter(s: typing.Union[TemplatePath, TemplateStr]) -> TemplatePath:
68-
...
68+
def _path_converter(s: typing.Union[TemplatePath, TemplateStr]) -> TemplatePath: ...
6969

7070

7171
@typing.overload
72-
def _path_converter(s: typing.Union[str, Path]) -> Path:
73-
...
72+
def _path_converter(s: typing.Union[str, Path]) -> Path: ...
7473

7574

7675
def _path_converter(s):
@@ -288,25 +287,25 @@ def find_requirements(attr_name: str) -> typing.Sequence[str]:
288287
@typing.overload
289288
def _make_single_replacement(
290289
self, value: typing.Union[str, TemplateStr], replacements: _ReplacementsMapType
291-
) -> str:
292-
...
290+
) -> str: ...
293291

294292
@typing.overload
295293
def _make_single_replacement(
296294
self,
297295
value: typing.Union[Path, TemplatePath],
298296
replacements: _ReplacementsMapType,
299-
) -> Path:
300-
...
297+
) -> Path: ...
301298

302299
def _make_single_replacement(self, value, replacements):
303300
if isinstance(value, TemplatePath):
304301
return Path(
305302
*(
306303
self._make_single_replacement(
307-
TemplateStr(component)
308-
if component.startswith("{{")
309-
else component,
304+
(
305+
TemplateStr(component)
306+
if component.startswith("{{")
307+
else component
308+
),
310309
replacements=replacements,
311310
)
312311
for component in value.parts

src/audio_feeder/file_probe.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Utilities for determining information about the files."""
2+
23
import copy
34
import datetime
45
import functools

src/audio_feeder/hash_utils.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@
77

88

99
class _Hash(typing.Protocol):
10-
def update(self, data: bytes) -> None:
11-
...
10+
def update(self, data: bytes) -> None: ...
1211

13-
def hexdigest(self) -> str:
14-
...
12+
def hexdigest(self) -> str: ...
1513

16-
def digest(self) -> bytes:
17-
...
14+
def digest(self) -> bytes: ...
1815

1916

2017
_HashFunc = typing.Callable[[], _Hash]

src/audio_feeder/html_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Module for handling HTML-related operations
33
"""
4+
45
import bisect
56
import io
67
from html.parser import HTMLParser

src/audio_feeder/m4btools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tools to split or create chaptered m4b files."""
2+
23
import copy
34
import functools
45
import logging

0 commit comments

Comments
 (0)