From 8c0964714c91d6fe42ba4bd1b94bcf89b1c56519 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Fri, 23 Dec 2022 21:41:47 -0600 Subject: [PATCH] crontab: upstream did some py2 cleanup (#9406) Fixes #9405 --- stubs/python-crontab/cronlog.pyi | 2 -- stubs/python-crontab/crontab.pyi | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/stubs/python-crontab/cronlog.pyi b/stubs/python-crontab/cronlog.pyi index 91cee9bf7..3faad0b0f 100644 --- a/stubs/python-crontab/cronlog.pyi +++ b/stubs/python-crontab/cronlog.pyi @@ -2,9 +2,7 @@ from _typeshed import Self, StrOrBytesPath from codecs import StreamReaderWriter from collections.abc import Generator, Iterator from types import TracebackType -from typing_extensions import Literal -PY3: Literal[True] MATCHER: str class LogReader: diff --git a/stubs/python-crontab/crontab.pyi b/stubs/python-crontab/crontab.pyi index af34573b4..a3c0128b1 100644 --- a/stubs/python-crontab/crontab.pyi +++ b/stubs/python-crontab/crontab.pyi @@ -6,7 +6,7 @@ from collections.abc import Callable, Generator, Iterator from logging import Logger from types import TracebackType from typing import Any -from typing_extensions import Literal, SupportsIndex +from typing_extensions import SupportsIndex from cronlog import CronLog @@ -19,7 +19,6 @@ MONTH_ENUM: list[str | None] SPECIALS: dict[str, str] SPECIAL_IGNORE: list[str] S_INFO: list[dict[str, Any]] -PY3: Literal[True] WINOS: bool POSIX: bool SYSTEMV: bool @@ -84,7 +83,6 @@ class CronTab: def remove(self, *items: CronItem | list[CronItem] | tuple[CronItem, ...] | Generator[CronItem, Any, Any]) -> int: ... def __iter__(self) -> Iterator[CronItem]: ... def __getitem__(self, i: SupportsIndex) -> CronItem: ... - def __unicode__(self) -> str: ... def __len__(self) -> int: ... class CronItem: @@ -150,7 +148,6 @@ class CronItem: def __getitem__(self, key: SupportsIndex) -> CronSlice: ... def __lt__(self, value) -> bool: ... def __gt__(self, value) -> bool: ... - def __unicode__(self) -> str: ... class Every: slices: Incomplete @@ -195,7 +192,6 @@ class CronSlice: def parse(self, value) -> None: ... def render(self, resolve: bool = ..., specials: bool = ...): ... def __eq__(self, arg: object) -> bool: ... - def __unicode__(self) -> str: ... def every(self, n_value, also: bool = ...): ... def on(self, *n_value, **opts): ... def during(self, vfrom, vto, also: bool = ...): ... @@ -232,7 +228,6 @@ class CronRange: def __lt__(self, value): ... def __gt__(self, value): ... def __int__(self) -> int: ... - def __unicode__(self) -> str: ... class OrderedVariableList(OrderedDict[Incomplete, Incomplete]): job: Incomplete