Skip to content

Commit

Permalink
feat: init type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
vvanglro committed Nov 4, 2022
1 parent 91a0c34 commit ac233db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pwhtmltopdf/core.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
import pathlib
import typing

from pwhtmltopdf.abc import BaseHTP
from pwhtmltopdf.types import StrPath, StrPathLike


class HtmlToPdf(BaseHTP):
def __init__(
self,
static_root: StrPath = None,
wait_until: typing.Optional[
typing.Literal["commit", "domcontentloaded", "load", "networkidle"]
] = None,
print_background: typing.Optional[bool] = None,
prefer_css_page_size: typing.Optional[bool] = None,
):
super().__init__(
static_root=static_root,
wait_until=wait_until,
print_background=print_background,
prefer_css_page_size=prefer_css_page_size,
)

async def from_url(
self,
url: str,
Expand Down
Empty file added pwhtmltopdf/py.typed
Empty file.

0 comments on commit ac233db

Please sign in to comment.