Skip to content

Commit

Permalink
Fixes for range and repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrattli committed May 11, 2019
1 parent d7ea622 commit b26f6fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion rx/core/observable/range.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
from typing import Optional

from rx.core import typing
from rx.core import Observable
from rx.concurrency import current_thread_scheduler
from rx.disposable import MultipleAssignmentDisposable


def _range(start: int, stop: int = None, step: int = None, scheduler: typing.Scheduler = None) -> Observable:
def _range(start: int,
stop: Optional[int] = None,
step: Optional[int] = None,
scheduler: Optional[typing.Scheduler] = None
) -> Observable:
"""Generates an observable sequence of integral numbers within a
specified range, using the specified scheduler to send out observer
messages.
Expand Down
4 changes: 2 additions & 2 deletions rx/core/observable/repeat.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from typing import Any
from typing import Any, Optional

import rx
from rx import operators as ops
from rx.core import Observable


def _repeat_value(value: Any = None, repeat_count: int = None) -> Observable:
def _repeat_value(value: Any = None, repeat_count: Optional[int] = None) -> Observable:
"""Generates an observable sequence that repeats the given element
the specified number of times.
Expand Down

0 comments on commit b26f6fd

Please sign in to comment.