From f48c6c98b1f6762934ce24673778ccde477226c9 Mon Sep 17 00:00:00 2001 From: Erik Kemperman Date: Wed, 5 Jun 2019 10:11:58 +0200 Subject: [PATCH] Make sure dunderscore docstrings are included --- docs/conf.py | 7 +++++++ rx/subject/behaviorsubject.py | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b55eaa893..5d3890870 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -60,6 +60,13 @@ 'sphinxcontrib_dooble', ] +# Include a separate entry for special methods, like __init__, where provided. +autodoc_default_options = { + 'member-order': 'bysource', + 'special-members': True, + 'exclude-members': '__dict__,__weakref__' +} + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/rx/subject/behaviorsubject.py b/rx/subject/behaviorsubject.py index 30277d65e..9e20e7458 100644 --- a/rx/subject/behaviorsubject.py +++ b/rx/subject/behaviorsubject.py @@ -17,9 +17,9 @@ def __init__(self, value) -> None: creates a subject that caches its last value and starts with the specified value. - Keyword parameters: - :param T value: Initial value sent to observers when no other - value has been received by the subject yet. + Args: + value: Initial value sent to observers when no other value has been + received by the subject yet. """ super().__init__() @@ -55,7 +55,7 @@ def dispose(self) -> None: """Release all resources. Releases all resources used by the current instance of the - ReplaySubject class and unsubscribe all observers. + BehaviorSubject class and unsubscribe all observers. """ with self.lock: