mirror of
https://github.com/rio-labs/rio.git
synced 2025-12-30 09:49:44 -06:00
rework docs infrastructure
This commit is contained in:
@@ -15,7 +15,7 @@ import rio.docs
|
||||
|
||||
ALIASES: dict[object, str] = {
|
||||
obj: f"rio.{doc.name}"
|
||||
for obj, doc in rio.docs.find_documented_objects().items()
|
||||
for obj, doc in rio.docs.get_documented_objects().items()
|
||||
}
|
||||
ALIASES[pandas.DataFrame] = "pandas.DataFrame"
|
||||
ALIASES[polars.DataFrame] = "polars.DataFrame"
|
||||
@@ -27,7 +27,7 @@ def main():
|
||||
with stub_file_path.open("w", encoding="utf8") as stub_file:
|
||||
writer = StubWriter(stub_file)
|
||||
|
||||
for docs in rio.docs.find_documented_objects().values():
|
||||
for docs in rio.docs.get_documented_objects().values():
|
||||
writer.write(docs)
|
||||
|
||||
# Run the file through a linter to ensure its correctness
|
||||
@@ -203,9 +203,9 @@ import rio
|
||||
|
||||
def _write_base_classes(self, docs: imy.docstrings.ClassDocs) -> None:
|
||||
public_base_classes = [
|
||||
rio.docs.find_documented_objects()[cls]
|
||||
rio.docs.get_documented_objects()[cls]
|
||||
for cls in docs.object.__bases__
|
||||
if cls in rio.docs.find_documented_objects()
|
||||
if cls in rio.docs.get_documented_objects()
|
||||
]
|
||||
|
||||
if not public_base_classes:
|
||||
|
||||
Reference in New Issue
Block a user