Skip to content

Commit a970176

Browse files
really fix formatting
1 parent d007a8f commit a970176

10 files changed

Lines changed: 15 additions & 17 deletions

File tree

lib/binarylane/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
""" Contains some shared types for properties """
2+
23
from __future__ import annotations
34

45
from http import HTTPStatus

scripts/generate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Generate updated API bindings and CLI commands from OpenAPI specification document"""
2+
23
from __future__ import annotations
34

45
import re

src/binarylane/config/options.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ class OptionAttributes(ABC):
2222
UNCONFIGURED_TOKEN: ClassVar[str] = "unconfigured"
2323

2424
@abstractmethod
25-
def get_option(self, name: OptionName) -> Optional[str]:
26-
...
25+
def get_option(self, name: OptionName) -> Optional[str]: ...
2726

2827
@abstractmethod
29-
def required_option(self, name: OptionName) -> str:
30-
...
28+
def required_option(self, name: OptionName) -> str: ...
3129

3230
@abstractmethod
33-
def add_option(self, name: OptionName, value: str) -> None:
34-
...
31+
def add_option(self, name: OptionName, value: str) -> None: ...
3532

3633
@staticmethod
3734
def to_bool(name: str) -> bool:

src/binarylane/config/repository.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111

1212
class Source(Protocol):
13-
def get(self, name: str) -> Optional[str]:
14-
...
13+
def get(self, name: str) -> Optional[str]: ...
1514

1615

1716
T = TypeVar("T", bound=Source)

src/binarylane/console/commands/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
""" Contains methods for accessing the API """
2+
23
from __future__ import annotations
34

45
import re

src/binarylane/console/parser/attribute.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ def group_name(self) -> Optional[str]:
6363
return self.parent.group_name if self.parent else None
6464

6565
@abstractmethod
66-
def configure(self, parser: Parser) -> None:
67-
...
66+
def configure(self, parser: Parser) -> None: ...
6867

6968
@abstractmethod
70-
def construct(self, parser: Parser, parsed: argparse.Namespace) -> object:
71-
...
69+
def construct(self, parser: Parser, parsed: argparse.Namespace) -> object: ...
7270

7371
def _unsupported(self, message: str, error: bool = True) -> None:
7472
"""Report that command parsing is not likely to work correctly"""

src/binarylane/console/parser/list_attribute.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def configure(self, parser: Parser) -> None:
7676
parser.add_group_help(title=self.title, description=self.description, entries=usage_descriptions)
7777

7878
parser.add_keyword(self.keyword)
79-
parser.add_argument(
80-
self.attribute_name, type=str, nargs=argparse.PARSER, help=argparse.SUPPRESS
81-
).required = False
79+
parser.add_argument(self.attribute_name, type=str, nargs=argparse.PARSER, help=argparse.SUPPRESS).required = (
80+
False
81+
)
8282

8383
def _create_singlestore_action(self, **kwargs: Any) -> argparse.Action:
8484
action = SingleStoreAction(**kwargs)

src/binarylane/console/parser/primitive_attribute.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def is_primitive_type(type_: type) -> bool:
2828
class Lookup(typing.Protocol):
2929
"""Lookup is a function that accepts an entity reference (e.g. its name) and returns that entity's ID"""
3030

31-
def __call__(self, ref: str) -> Optional[int]:
32-
...
31+
def __call__(self, ref: str) -> Optional[int]: ...
3332

3433

3534
class PrimitiveAttribute(Attribute):

src/binarylane/console/printers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Printers provide different methods of formatting and displaying API responses"""
2+
23
from __future__ import annotations
34

45
from enum import Enum

src/binarylane/pycompat/actions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
""" BooleanOptionalAction imported from 3.9 """
2+
23
from __future__ import annotations
34

45
import argparse

0 commit comments

Comments
 (0)