From 49477fd8fa4afd3a6685ab6250a55bd30c3650b1 Mon Sep 17 00:00:00 2001 From: "Md. Almas Ali" Date: Wed, 1 May 2024 18:11:04 +0600 Subject: [PATCH] fix: make format (ruff global issue). --- core/datatypes.py | 12 ++++-------- core/nodes.py | 6 ++---- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/core/datatypes.py b/core/datatypes.py index 14b77e7..9d3a820 100755 --- a/core/datatypes.py +++ b/core/datatypes.py @@ -1015,8 +1015,7 @@ def __init__(self, parent_class, symbol_table): self.symbol_table = SymbolTable(symbol_table) @abstractmethod - def operator(self, operator: str, *args: Value) -> ResultTuple: - ... + def operator(self, operator: str, *args: Value) -> ResultTuple: ... def added_to(self, other: Value) -> ResultTuple: return self.operator("__add__", other) @@ -1122,8 +1121,7 @@ def __init__(self, name: str, symbol_table: SymbolTable) -> None: self.symbol_table = symbol_table @abstractmethod - def get(self, name: str) -> Optional[Value]: - ... + def get(self, name: str) -> Optional[Value]: ... def dived_by(self, other: Value) -> ResultTuple: if not isinstance(other, String): @@ -1136,12 +1134,10 @@ def dived_by(self, other: Value) -> ResultTuple: return value, None @abstractmethod - def create(self, args: list[Value]) -> RTResult[BaseInstance]: - ... + def create(self, args: list[Value]) -> RTResult[BaseInstance]: ... @abstractmethod - def init(self, inst: BaseInstance, args: list[Value], kwargs: dict[str, Value]) -> RTResult[None]: - ... + def init(self, inst: BaseInstance, args: list[Value], kwargs: dict[str, Value]) -> RTResult[None]: ... def execute(self, args: list[Value], kwargs: dict[str, Value]) -> RTResult[Value]: res = RTResult[Value]() diff --git a/core/nodes.py b/core/nodes.py index e7e22fa..5067c79 100755 --- a/core/nodes.py +++ b/core/nodes.py @@ -12,12 +12,10 @@ @runtime_checkable class Node(Protocol): @property - def pos_start(self) -> Position: - ... + def pos_start(self) -> Position: ... @property - def pos_end(self) -> Position: - ... + def pos_end(self) -> Position: ... class NumberNode: