Skip to content

Commit 5a91eb7

Browse files
author
Günther Jena
committed
fix mypy and flake8
1 parent 656c6ec commit 5a91eb7

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Lint with flake8
2424
run: flake8 broqer
2525
- name: Static type checking
26-
run: mypy broqer --no-strict-optional
26+
run: mypy broqer --no-strict-optional --disable-error-code type-var --disable-error-code call-arg
2727
- name: Check coding style
2828
run: pylama
2929
- name: Check Readme style

broqer/op/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, init: Any = NONE) -> None:
4242
Operator.__init__(self)
4343
self._state = init
4444

45-
def get(self) -> ValueT: # type:ignore[type-var]
45+
def get(self) -> ValueT:
4646
if self._originator is None:
4747
raise ValueError('Operator is missing originator')
4848

broqer/op/map_.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(self, function: Callable[[Any], Any], *args,
6464
self._function = partial(function, *args, **kwargs)
6565
self._unpack = unpack
6666

67-
def get(self) -> ValueT: # type:ignore[type-var]
67+
def get(self) -> ValueT:
6868
if self._subscriptions:
6969
return self._state
7070

@@ -80,7 +80,7 @@ def get(self) -> ValueT: # type:ignore[type-var]
8080
assert isinstance(value, (list, tuple))
8181
return self._function(*value)
8282

83-
return self._function(value) # type:ignore[call-arg]
83+
return self._function(value)
8484

8585
def emit(self, value: ValueT, who: Publisher) -> None:
8686
if who is not self._originator:
@@ -90,7 +90,7 @@ def emit(self, value: ValueT, who: Publisher) -> None:
9090
assert isinstance(value, (list, tuple))
9191
result = self._function(*value)
9292
else:
93-
result = self._function(value) # type:ignore[call-arg]
93+
result = self._function(value)
9494

9595
if result is not NONE:
9696
return Publisher.notify(self, result)

broqer/publisher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def unsubscribe(self, subscriber: 'Subscriber') -> None:
131131

132132
raise SubscriptionError('Subscriber is not registered')
133133

134-
def get(self) -> ValueT: # type:ignore[type-var]
134+
def get(self) -> ValueT:
135135
""" Return the state of the publisher. """
136136
return self._state
137137

broqer/subscribers/trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def _trace_handler(publisher: 'Publisher', value, label=None):
4242
and the emitted value
4343
"""
4444
time_diff = time() - Trace._timestamp_start
45-
line = f'--- {time_diff:8.3f}: '
45+
line = f'--- {time_diff: 8.3f}: '
4646
line += repr(publisher) if label is None else label
4747
line += f' {value!r}'
4848
print(line)

0 commit comments

Comments
 (0)