diff --git a/libexec/revng/check-conventions b/libexec/revng/check-conventions index 25771fac4..8209af2b7 100755 --- a/libexec/revng/check-conventions +++ b/libexec/revng/check-conventions @@ -114,8 +114,7 @@ class Pass(abc.ABC): @abc.abstractmethod async def run( self, files: Dict[str, Dict[Path, str]], args: Dict[str, str | bool] - ) -> PassResult: - ... + ) -> PassResult: ... class TaggedPass(Pass, abc.ABC): @@ -137,8 +136,7 @@ class TaggedPass(Pass, abc.ABC): return await self.process(files[self.tag], args) @abc.abstractmethod - async def process(self, files: Dict[Path, str], args: Dict[str, str | bool]) -> PassResult: - ... + async def process(self, files: Dict[Path, str], args: Dict[str, str | bool]) -> PassResult: ... def log(string: str): diff --git a/python/revng/internal/api/errors.py b/python/revng/internal/api/errors.py index 5e7856cba..86e06fc63 100644 --- a/python/revng/internal/api/errors.py +++ b/python/revng/internal/api/errors.py @@ -58,12 +58,10 @@ class DocumentErrorReasonList(Sequence[DocumentErrorReason]): return _api.rp_document_error_reasons_count(self.document_error._document_error) @overload - def __getitem__(self, idx: int) -> DocumentErrorReason: - ... + def __getitem__(self, idx: int) -> DocumentErrorReason: ... @overload - def __getitem__(self, idx: slice) -> Sequence[DocumentErrorReason]: - ... + def __getitem__(self, idx: slice) -> Sequence[DocumentErrorReason]: ... def __getitem__(self, idx: int | slice): if isinstance(idx, int): diff --git a/python/revng/internal/api/synchronizer.py b/python/revng/internal/api/synchronizer.py index 800c8da6a..0f9ce5c3b 100644 --- a/python/revng/internal/api/synchronizer.py +++ b/python/revng/internal/api/synchronizer.py @@ -23,20 +23,15 @@ class Synchronizer(Protocol): """A Synchronizer is a class that takes care of saving the manager's workdir somewhere other than the local disk.""" - def load(self, path: Path) -> bool: - ... + def load(self, path: Path) -> bool: ... - def save(self, path: Path, old_directories: list[Path]) -> bool: - ... + def save(self, path: Path, old_directories: list[Path]) -> bool: ... - def save_exceptions(self) -> tuple[type[Exception], ...]: - ... + def save_exceptions(self) -> tuple[type[Exception], ...]: ... - def get_initial_credentials(self) -> str: - ... + def get_initial_credentials(self) -> str: ... - def set_credentials(self, credentials: str): - ... + def set_credentials(self, credentials: str): ... executor = ThreadPoolExecutor(8) diff --git a/python/revng/internal/cli/_commands/graphql/daemon_handler.py b/python/revng/internal/cli/_commands/graphql/daemon_handler.py index 78518c95b..b0fe96ea3 100644 --- a/python/revng/internal/cli/_commands/graphql/daemon_handler.py +++ b/python/revng/internal/cli/_commands/graphql/daemon_handler.py @@ -19,11 +19,9 @@ from revng.internal.cli.support import popen class DaemonHandler(Protocol): url: str - async def wait_for_start(self): - ... + async def wait_for_start(self): ... - def terminate(self) -> int: - ... + def terminate(self) -> int: ... class ExternalDaemonHandler(DaemonHandler): diff --git a/python/revng/tupletree/__init__.py b/python/revng/tupletree/__init__.py index ad204b7cc..c060938ac 100644 --- a/python/revng/tupletree/__init__.py +++ b/python/revng/tupletree/__init__.py @@ -521,13 +521,11 @@ class DiffSet(abc.ABC, Generic[StructBaseT]): @staticmethod @abc.abstractmethod - def _get_root() -> StructBase: - ... + def _get_root() -> StructBase: ... @staticmethod @abc.abstractmethod - def _get_types_metadata() -> TypesMetadata: - ... + def _get_types_metadata() -> TypesMetadata: ... @classmethod def make(cls, obj_old: StructBaseT, obj_new: StructBaseT) -> "DiffSet": diff --git a/scripts/tuple-tree-generate.py b/scripts/tuple-tree-generate.py index fda0cf49f..deaca925e 100755 --- a/scripts/tuple-tree-generate.py +++ b/scripts/tuple-tree-generate.py @@ -36,8 +36,7 @@ class Subcommand(abc.ABC): self.parser.set_defaults(handler=self.handle) @abc.abstractmethod - def handle(self, args, schema: Schema): - ... + def handle(self, args, schema: Schema): ... @staticmethod def handle_single_file_output(output: str | None, source: str):