mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
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:
25
stubs/python-crontab/crontabs.pyi
Normal file
25
stubs/python-crontab/crontabs.pyi
Normal 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: ...
|
||||
Reference in New Issue
Block a user