From ab301b0b56b345dcedfc26fb4c825507e8f8c3ec Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Wed, 18 Sep 2024 14:16:55 +0200 Subject: [PATCH] Updated doc --- docs/_config.yml | 1 + src/random_events/interval.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/_config.yml b/docs/_config.yml index b90756d..daf0ffc 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -42,6 +42,7 @@ sphinx: - 'sphinx.ext.autodoc' - 'sphinx.ext.autosummary' - 'autoapi.extension' + - 'sphinx.ext.coverage' config: suppress_warnings: ["mystnb.unknown_mime_type"] autosummary_generate: True diff --git a/src/random_events/interval.py b/src/random_events/interval.py index 52eaf5a..842833f 100644 --- a/src/random_events/interval.py +++ b/src/random_events/interval.py @@ -1,4 +1,5 @@ from __future__ import annotations + import enum import math from dataclasses import dataclass @@ -8,7 +9,6 @@ from typing_extensions import Self from . import sigma_algebra -from .sigma_algebra import AbstractCompositeSet class Bound(enum.Enum): @@ -238,6 +238,7 @@ def contained_integers(self) -> int: def open(left: float, right: float) -> Interval: """ Creates an open interval. + :param left: The left bound of the interval. :param right: The right bound of the interval. :return: The open interval. @@ -248,6 +249,7 @@ def open(left: float, right: float) -> Interval: def closed(left: float, right: float) -> Interval: """ Creates a closed interval. + :param left: The left bound of the interval. :param right: The right bound of the interval. :return: The closed interval. @@ -258,6 +260,7 @@ def closed(left: float, right: float) -> Interval: def open_closed(left: float, right: float) -> Interval: """ Creates an open-closed interval. + :param left: The left bound of the interval. :param right: The right bound of the interval. :return: The open-closed interval. @@ -268,6 +271,7 @@ def open_closed(left: float, right: float) -> Interval: def closed_open(left: float, right: float) -> Interval: """ Creates a closed-open interval. + :param left: The left bound of the interval. :param right: The right bound of the interval. :return: The closed-open interval. @@ -278,6 +282,7 @@ def closed_open(left: float, right: float) -> Interval: def singleton(value: float) -> Interval: """ Creates a singleton interval. + :param value: The value of the interval. :return: The singleton interval. """ @@ -287,6 +292,7 @@ def singleton(value: float) -> Interval: def reals() -> Interval: """ Creates the set of real numbers. + :return: The set of real numbers. """ return SimpleInterval(float('-inf'), float('inf'), Bound.OPEN, Bound.OPEN).as_composite_set()