Skip to content

Commit

Permalink
fix ruff 0.8.5 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Jan 4, 2025
1 parent 473c84f commit 06a4f77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions scal3/plugin_type.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
from __future__ import annotations

import typing
from typing import TYPE_CHECKING

from scal3.s_object import SObj

if TYPE_CHECKING:
from collections.abc import Sequence


class BasePlugin(SObj):
name: str | None
external: bool
loaded: bool
params: typing.Sequence[str]
essentialParams: typing.Sequence[str]
params: Sequence[str]
essentialParams: Sequence[str]

def getArgs(self): ...

Expand Down
5 changes: 4 additions & 1 deletion scal3/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
from math import ceil, floor
from typing import Any

if typing.TYPE_CHECKING:
from collections.abc import Iterator

Number: typing.TypeAlias = int | float


Expand Down Expand Up @@ -213,7 +216,7 @@ def insert(self, index: int, key: str, value: Any):
self.keyList.insert(index, key)
dict.__setitem__(self, key, value) # noqa: PLC2801

def sort(self, attr: str | None = None) -> typing.Iterator:
def sort(self, attr: str | None = None) -> Iterator:
if attr is None:
self.keyList.sort()
else:
Expand Down

0 comments on commit 06a4f77

Please sign in to comment.