Skip to content

Commit

Permalink
Minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrattli committed Mar 3, 2022
1 parent 2eb7d1a commit 8a875af
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
19 changes: 12 additions & 7 deletions docs/migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
Migration v4
============

ReactiveX for Python v4 is yet annother major evolution of RxPY v3:

- Project main module renamed from `rx` to `reactivex`.
- Type annotation. Code now type checks with pyright / pylance at strict
settings
- RxPY is now a modern Python project using Poetry, Black formatter and
isort.
ReactiveX for Python v4 is yet another evolution of RxPY v3:

- Project main module renamed from ``rx`` to ``reactivex``. This is done
to give it a unique name different from the obsolete `Reactive Extensions
(RxPY) <https://github.com/Reactive-Extensions/RxPy>`_
- Generic type annotations. Code now type checks with pyright / pylance
at strict settings. It also for most type checks with mypy. Mypy
should eventually catch up.
- The ``pipe`` function has been renamed to ``compose``. There is now a
new function ``pipe`` that works similar to the ``pipe`` method.
- RxPY is now a modern Python project using ``pyproject.toml``, Poetry,
Black formatter and isort.

.. code:: python
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "reactivex"
version = "4.0.0a4" # Make sure the version here is the same as in _version.py
description = "Reactive Extensions (Rx) for Python"
description = "ReactiveX (Rx) for Python"
readme = "README.rst"
authors = ["Dag Brattli <[email protected]>"]
license = "MIT License"
Expand Down Expand Up @@ -59,7 +59,7 @@ float_to_top=true
python_version = "3.9"
follow_imports = "silent"
files = ["reactivex"]
exclude = ["reactivex/operators/_\\w.*\\.py$"]
exclude = ["reactivex/operators/_\\w.*\\.py$"] # mypy will eventually catch up

[tool.pytest.ini_options]
testpaths = ["tests"]
Expand Down
5 changes: 2 additions & 3 deletions reactivex/operators/_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
_TOther = TypeVar("_TOther")


# pylint: disable=redefined-builtin
def zip_(
*args: Observable[Any],
) -> Callable[[Observable[Any]], Observable[Tuple[Any, ...]]]:
def zip(source: Observable[Any]) -> Observable[Tuple[Any, ...]]:
def _zip(source: Observable[Any]) -> Observable[Tuple[Any, ...]]:
"""Merges the specified observable sequences into one observable
sequence by creating a tuple whenever all of the
observable sequences have produced an element at a corresponding
Expand All @@ -29,7 +28,7 @@ def zip(source: Observable[Any]) -> Observable[Tuple[Any, ...]]:
"""
return reactivex.zip(source, *args)

return zip
return _zip


def zip_with_iterable_(
Expand Down

0 comments on commit 8a875af

Please sign in to comment.