Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Oct 17, 2024
1 parent 102d093 commit e3043cc
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spinn_utilities/abstract_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""
A trimmed down version of standard Python Abstract Base classes.
"""
from typing import Any, cast, Dict, Type, TypeVar, Tuple
from typing import Any, Dict, Type, TypeVar, Tuple
#: :meta private:
T = TypeVar("T")

Expand Down
1 change: 1 addition & 0 deletions spinn_utilities/classproperty.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from typing import Any, Optional, Type


class _ClassPropertyDescriptor(object):
"""
A class to handle the management of class properties.
Expand Down
2 changes: 1 addition & 1 deletion spinn_utilities/helpful_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from functools import reduce
import logging
import math
from typing import Any, cast, Sequence, Tuple, Union, overload
from typing import Any, Sequence, Union, overload
from typing_extensions import TypeGuard
from spinn_utilities.log import FormatAdapter

Expand Down
2 changes: 1 addition & 1 deletion spinn_utilities/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def atexit_handler(cls) -> None:

@classmethod
def _pop_not_stored_messages(
cls, min_level: int = 0) -> List[Tuple[datetime, int, str]]:
cls, min_level: int = 0) -> List[Tuple[datetime, int, str]]:
"""
Returns the log of messages to print on exit and
*clears that log*.
Expand Down
2 changes: 1 addition & 1 deletion spinn_utilities/make_tools/log_sqllite_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def __init_db(self) -> None:

def __clear_db(self) -> None:
assert self._db is not None
with self._db as db:
with self._db:
cursor = self._db.cursor()
cursor.execute("DELETE FROM log")
cursor.execute("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='log'")
Expand Down
2 changes: 1 addition & 1 deletion spinn_utilities/progress_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import os
import sys
from types import TracebackType
from typing import (cast, Dict, Iterable, List, Optional, Tuple, Type,
from typing import (Dict, Iterable, List, Optional, Tuple, Type,
TypeVar, Union)

from typing_extensions import Literal, Self
Expand Down
3 changes: 2 additions & 1 deletion spinn_utilities/ranged/abstract_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def ids(self) -> Sequence[int]:
raise NotImplementedError

@overload
def iter_all_values(self, key: str, update_safe: bool = False) -> Iterator[T]:
def iter_all_values(
self, key: str, update_safe: bool = False) -> Iterator[T]:
...

@overload
Expand Down
2 changes: 1 addition & 1 deletion spinn_utilities/ranged/ranged_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ def set_value_by_ids(

def set_value_by_selector(
self, selector: Selector, value: _ValueType,
use_list_as_value: bool =False) -> None:
use_list_as_value: bool = False) -> None:
"""
Support for the ``list[x] =`` format.
Expand Down
2 changes: 1 addition & 1 deletion spinn_utilities/require_subclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Any, Callable, Dict, List, Type
from typing import Any, Callable, Dict, Type

from spinn_utilities.abstract_base import AbstractBase

Expand Down

0 comments on commit e3043cc

Please sign in to comment.