Skip to content

Commit

Permalink
Update to pyright v286
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrattli committed Jan 7, 2023
1 parent 26f927b commit f64f830
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
language: node
pass_filenames: false
types: [python]
additional_dependencies: ["[email protected].278"]
additional_dependencies: ["[email protected].286"]
repo: local
- hooks:
- id: mypy
Expand Down
4 changes: 1 addition & 3 deletions reactivex/operators/_distinct.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ def distinct_(
key_mapper: Optional[typing.Mapper[_T, _TKey]] = None,
comparer: Optional[typing.Comparer[_TKey]] = None,
) -> Callable[[Observable[_T]], Observable[_T]]:
comparer_: typing.Comparer[_TKey] = comparer or cast(
typing.Comparer[_TKey], default_comparer
)
comparer_ = comparer or cast(typing.Comparer[_TKey], default_comparer)

def distinct(source: Observable[_T]) -> Observable[_T]:
"""Returns an observable sequence that contains only distinct
Expand Down
4 changes: 2 additions & 2 deletions reactivex/operators/_timestamp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Callable, Generic, Optional, TypeVar
from typing import Callable, Generic, Optional, TypeVar

from reactivex import Observable, abc, defer, operators
from reactivex.scheduler import TimeoutScheduler
Expand All @@ -17,7 +17,7 @@ class Timestamp(Generic[_T]):
def timestamp_(
scheduler: Optional[abc.SchedulerBase] = None,
) -> Callable[[Observable[_T]], Observable[Timestamp[_T]]]:
def timestamp(source: Observable[Any]) -> Observable[Timestamp[_T]]:
def timestamp(source: Observable[_T]) -> Observable[Timestamp[_T]]:
"""Records the timestamp for each value in an observable sequence.
Examples:
Expand Down

0 comments on commit f64f830

Please sign in to comment.