jedi: improve signature information

This fixes numerous issues where jedi provided incomplete or poorly
formatted signatures and docstrings.

Issue: https://github.com/pybricks/pybricks-code/issues/932
This commit is contained in:
David Lechner
2022-06-25 23:54:49 -05:00
parent a758eaa1db
commit e95386e23e
12 changed files with 1131 additions and 300 deletions
+13 -3
View File
@@ -3,10 +3,15 @@
"""Common tools for timing and data logging."""
from typing import Any
from __future__ import annotations
from typing import TYPE_CHECKING, Any
if TYPE_CHECKING:
from .parameters import Number
def wait(time: int) -> None:
def wait(time: Number) -> None:
"""wait(time)
Pauses the user program for a specified amount of time.
@@ -63,7 +68,7 @@ class DataLog:
name: str = "log",
timestamp: bool = True,
extension: str = "csv",
append: bool = False
append: bool = False,
):
"""DataLog(*headers, name='log', timestamp=True, extension='csv', append=False)
@@ -90,3 +95,8 @@ class DataLog:
Arguments:
values (object, object, ...): One or more objects or values.
"""
# HACK: hide from jedi
if TYPE_CHECKING:
del Number