Skip to content

Commit

Permalink
Lint again
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Jun 6, 2024
1 parent 0101c56 commit e2cb1a2
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 49 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added Kotlin and Cpp-sdk drivers keys (DOP-4608).
- Support for clickInclude function in the VSCode extension (DOP-4441).

### Fixed

- Alphabetized Realm languages (#593).

### Changed

- Update dependencies.

### Fixed

- Alphabetized Realm languages (#593).

## [v0.16.7] - 2024-05-15

### Added
Expand Down
3 changes: 1 addition & 2 deletions snooty/flutter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ class HasAnnotations(Protocol):


class Constructable(Protocol):
def __init__(self, **kwargs: object) -> None:
...
def __init__(self, **kwargs: object) -> None: ...


_A = TypeVar("_A", bound=HasAnnotations)
Expand Down
6 changes: 3 additions & 3 deletions snooty/page_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def start(

return result

self.worker: util.WorkerLauncher[
Postprocessor, PostprocessorResult
] = util.WorkerLauncher("postprocessor", start)
self.worker: util.WorkerLauncher[Postprocessor, PostprocessorResult] = (
util.WorkerLauncher("postprocessor", start)
)

def set_orphan_diagnostics(self, key: FileId, value: List[Diagnostic]) -> None:
"""Some diagnostics can't be associated with a parsed Page because of underlying
Expand Down
23 changes: 9 additions & 14 deletions snooty/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1366,37 +1366,32 @@ class ProjectBackend:
def on_config(self, config: ProjectConfig, branch: str) -> None:
pass

def on_progress(self, progress: int, total: int, message: str) -> None:
...
def on_progress(self, progress: int, total: int, message: str) -> None: ...

def on_diagnostics(self, path: FileId, diagnostics: List[Diagnostic]) -> None:
...
def on_diagnostics(self, path: FileId, diagnostics: List[Diagnostic]) -> None: ...

def set_diagnostics(self, path: FileId, diagnostics: List[Diagnostic]) -> None:
...
def set_diagnostics(self, path: FileId, diagnostics: List[Diagnostic]) -> None: ...

def on_update(
self,
prefix: List[str],
build_identifiers: BuildIdentifierSet,
page_id: FileId,
page: Page,
) -> None:
...
) -> None: ...

def on_update_metadata(
self,
prefix: List[str],
build_identifiers: BuildIdentifierSet,
field: Dict[str, SerializableType],
) -> None:
...
) -> None: ...

def on_delete(self, page_id: FileId, build_identifiers: BuildIdentifierSet) -> None:
...
def on_delete(
self, page_id: FileId, build_identifiers: BuildIdentifierSet
) -> None: ...

def flush(self) -> None:
...
def flush(self) -> None: ...

def close(self) -> None:
pass
Expand Down
12 changes: 4 additions & 8 deletions snooty/rstparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,17 +973,13 @@ def __init__(
project_config: ProjectConfig,
docpath: PurePath,
document: tinydocutils.nodes.document,
) -> None:
...
) -> None: ...

def dispatch_visit(self, node: tinydocutils.nodes.Node) -> None:
...
def dispatch_visit(self, node: tinydocutils.nodes.Node) -> None: ...

def dispatch_departure(self, node: tinydocutils.nodes.Node) -> None:
...
def dispatch_departure(self, node: tinydocutils.nodes.Node) -> None: ...

def add_diagnostics(self, diagnostics: Iterable[Diagnostic]) -> None:
...
def add_diagnostics(self, diagnostics: Iterable[Diagnostic]) -> None: ...


_V = TypeVar("_V", bound=Visitor, covariant=True)
Expand Down
6 changes: 2 additions & 4 deletions snooty/tinydocutils/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,11 +1163,9 @@ class NodeVisitor(Protocol):
1995.
"""

def dispatch_visit(self, node: Node) -> None:
...
def dispatch_visit(self, node: Node) -> None: ...

def dispatch_departure(self, node: Node) -> None:
...
def dispatch_departure(self, node: Node) -> None: ...


class TreePruningException(Exception):
Expand Down
6 changes: 2 additions & 4 deletions snooty/tinydocutils/statemachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,10 @@ def __len__(self) -> int:
# just works.

@overload
def __getitem__(self, i: int) -> str:
...
def __getitem__(self, i: int) -> str: ...

@overload
def __getitem__(self, i: slice) -> "StringList":
...
def __getitem__(self, i: slice) -> "StringList": ...

def __getitem__(self, i: Union[int, slice]) -> Union[str, "StringList"]:
if isinstance(i, slice):
Expand Down
6 changes: 3 additions & 3 deletions snooty/tinydocutils/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,9 +1020,9 @@ def nested_list_parse(
if blank_finish_state is None:
blank_finish_state = initial_state

state_machine.get_blank_finish_state(
blank_finish_state
).blank_finish = blank_finish
state_machine.get_blank_finish_state(blank_finish_state).blank_finish = (
blank_finish
)
for key, value in extra_settings.items():
setattr(state_machine.states[initial_state], key, value)
state_machine.run_nested_sm(
Expand Down
6 changes: 2 additions & 4 deletions snooty/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@


class EmbeddedRstParser(Protocol):
def parse_block(self, text: str, lineno: int) -> MutableSequence[n.Node]:
...
def parse_block(self, text: str, lineno: int) -> MutableSequence[n.Node]: ...

def parse_inline(self, text: str, lineno: int) -> MutableSequence[n.InlineNode]:
...
def parse_inline(self, text: str, lineno: int) -> MutableSequence[n.InlineNode]: ...


def normalize_target(target: str) -> str:
Expand Down
6 changes: 3 additions & 3 deletions snooty/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ def run(self, arg: _T) -> queue.Queue[Tuple[Optional[_R], Optional[Exception]]]:
"""Cancel any current thread of execution; block until it is cancelled; and re-launch the worker."""
self.cancel()

result_queue: queue.Queue[
Tuple[Optional[_R], Optional[Exception]]
] = queue.Queue(1)
result_queue: queue.Queue[Tuple[Optional[_R], Optional[Exception]]] = (
queue.Queue(1)
)

def inner() -> None:
try:
Expand Down

0 comments on commit e2cb1a2

Please sign in to comment.