Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Jan 22, 2025
1 parent 86ca051 commit 6a31e43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions playa/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,8 +1406,10 @@ def __init__(
) -> None:
self.docref = _ref_document(doc)
if pages is not None:
self._pages = pages
self._labels: Dict[str, Page] = {page.label: page for page in pages}
self._pages = list(pages)
self._labels: Dict[str, Page] = {
page.label: page for page in pages if page.label is not None
}
else:
self._init_pages(doc)

Expand Down
2 changes: 1 addition & 1 deletion playa/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from playa.page import Page

# Type signature of document reference
DocumentRef = Union[weakref.ReferenceType["Document"], int]
DocumentRef = int
# Type signature of page reference
PageRef = Tuple[DocumentRef, int]

Expand Down

0 comments on commit 6a31e43

Please sign in to comment.