Skip to content

Commit

Permalink
fix: make format (ruff global issue).
Browse files Browse the repository at this point in the history
  • Loading branch information
Almas-Ali committed May 1, 2024
1 parent 2543065 commit 49477fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 4 additions & 8 deletions core/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand All @@ -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]()
Expand Down
6 changes: 2 additions & 4 deletions core/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 49477fd

Please sign in to comment.