Add stubs for python-cronlog (#8917)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
kasium
2022-10-20 03:06:55 +02:00
committed by GitHub
parent de68029716
commit a9236f9cc9
5 changed files with 292 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
from typing import Any
from crontab import CronTab
class UserSpool(list[CronTab]):
def __init__(self, loc: str, tabs: CronTabs | None = ...) -> None: ...
def listdir(self, loc: str) -> list[str]: ...
def get_owner(self, path: str) -> str: ...
def generate(self, loc: str, username: str) -> CronTab: ...
class SystemTab(list[CronTab]):
def __init__(self, loc: str, tabs: CronTabs | None = ...) -> None: ...
class AnaCronTab(list[CronTab]):
def __init__(self, loc: str, tabs: CronTabs | None = ...) -> None: ...
def add(self, loc: str, item: str, anajob) -> CronTab: ...
KNOWN_LOCATIONS: list[tuple[UserSpool | SystemTab | AnaCronTab, str]]
class CronTabs(list[UserSpool | SystemTab | AnaCronTab]):
def __new__(cls, *args: Any, **kw: Any): ...
def __init__(self) -> None: ...
def add(self, cls: type[UserSpool | SystemTab | AnaCronTab], *args: Any) -> None: ...
@property
def all(self) -> CronTab: ...