Skip to content

Commit

Permalink
fix ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Jan 5, 2025
1 parent 4fca13b commit 6330755
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 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
1 change: 0 additions & 1 deletion scripts/version-set.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys
from datetime import datetime
Expand Down

0 comments on commit 6330755

Please sign in to comment.