Skip to content

Commit

Permalink
cleanup docs build process and add various improvements (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
wbarnha committed Sep 1, 2022
1 parent 6475f8c commit 34d2694
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ livedocs:

clean-docs:
-rm -rf "$(SPHINX_BUILDDIR)"
-rm -rf "$(DOCUMENTATION)"

lint: flakecheck apicheck configcheck readmecheck pep257check vulture

Expand Down
7 changes: 5 additions & 2 deletions docs/_ext/typehints.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import inspect
import logging
from typing import Any, AnyStr, TypeVar, get_type_hints
try:
from sphinx.ext.autodoc import Signature
Expand Down Expand Up @@ -127,10 +128,12 @@ def process_docstring(app, what, name, obj, options, lines):
obj = inspect.unwrap(obj)
try:
type_hints = get_type_hints(obj)
# except (AttributeError, TypeError):
except: # FIXME: A new exception is being raised, likely due to upgrading sphinx
except (AttributeError, TypeError):
# Introspecting a slot wrapper will raise TypeError
return
except Exception as e: # FIXME: A new exception is being raised, likely due to upgrading sphinx
logging.exception(e)
return

for argname, annotation in type_hints.items():
formatted_annotation = format_annotation(annotation)
Expand Down
10 changes: 8 additions & 2 deletions faust/stores/rocksdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,14 @@ def as_options(self) -> Options:

class Store(base.SerializedStore):
"""RocksDB table storage.
Pass 'options={'read_only': True}' as an option into a Table class
to allow a RocksDB store be used by multiple apps.
.. tip::
You can specify 'read_only' as an option into a Table class
to allow a RocksDB store be used by multiple apps::
app.App(..., store="rocksdb://")
app.GlobalTable(..., options={'read_only': True})
"""

offset_key = b"__faust\0offset__"
Expand Down

0 comments on commit 34d2694

Please sign in to comment.