foobar.foo foobar/foo.py foo module. bar ¶ bar(data: list[int] | None = None) -> int | None Sum list of integers. Parameters: data ((list[int], None), default: None ) – optional list of integers (default: None). Returns: int | None – None if data=None else the integer sum of data. Source code in foobar/foo.py 6 7 8 9 10 11 12 13 14 15 16 17def bar(data: list[int] | None = None) -> int | None: """Sum list of integers. Args: data (list[int], None): optional list of integers (default: None). Returns: `None` if `data=None` else the integer sum of `data`. """ if data is not None: return sum(data) return None