Skip to content

Commit

Permalink
chore: better template types
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Apr 22, 2024
1 parent e57da06 commit f9ad429
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/appier/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ class App:
conf: bool = ...,
**kwargs
): ...
def template(
self,
template: Template | PathLike[str] | str,
content_type: str = ...,
templates_path: PathLike[str] | str | None = ...,
cache: bool = ...,
detached: bool = ...,
locale: str | None = ...,
asynchronous: bool = ...,
**kwargs
) -> str: ...
def cron(self, job: JobFunction, cron: Cron) -> SchedulerTask: ...
def url_for(
self,
Expand All @@ -97,6 +108,7 @@ class App:

class APIApp(App): ...
class WebApp(App): ...
class Template: ...

def get_app() -> App: ...
def get_name() -> str | None: ...
Expand Down
1 change: 1 addition & 0 deletions src/appier/model.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class Model:
before_callbacks: Sequence[Callable[[Self], None]] = ...,
after_callbacks: Sequence[Callable[[Self], None]] = ...,
) -> Self: ...
...

class Field:
def __init__(self, *args, **kwargs): ...
Expand Down

0 comments on commit f9ad429

Please sign in to comment.