mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-16 23:13:37 +08:00
Improve some in-place BinOp methods (#7149)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import datetime
|
||||
from _typeshed import Self
|
||||
from typing import Iterable
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
@@ -19,9 +20,9 @@ class DateTimeRange:
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
def __add__(self, other: datetime.timedelta) -> DateTimeRange: ...
|
||||
def __iadd__(self, other: datetime.timedelta) -> DateTimeRange: ...
|
||||
def __iadd__(self: Self, other: datetime.timedelta) -> Self: ...
|
||||
def __sub__(self, other: datetime.timedelta) -> DateTimeRange: ...
|
||||
def __isub__(self, other: datetime.timedelta) -> DateTimeRange: ...
|
||||
def __isub__(self: Self, other: datetime.timedelta) -> Self: ...
|
||||
def __contains__(self, x: datetime.timedelta | DateTimeRange | str) -> bool: ...
|
||||
@property
|
||||
def start_datetime(self) -> datetime.datetime: ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import importlib.abc
|
||||
import types
|
||||
import zipimport
|
||||
from _typeshed import Self
|
||||
from abc import ABCMeta
|
||||
from typing import IO, Any, Callable, Generator, Iterable, Optional, Sequence, TypeVar, Union, overload
|
||||
|
||||
@@ -53,7 +54,7 @@ class Environment:
|
||||
def remove(self, dist: Distribution) -> None: ...
|
||||
def can_add(self, dist: Distribution) -> bool: ...
|
||||
def __add__(self, other: Distribution | Environment) -> Environment: ...
|
||||
def __iadd__(self, other: Distribution | Environment) -> Environment: ...
|
||||
def __iadd__(self: Self, other: Distribution | Environment) -> Self: ...
|
||||
@overload
|
||||
def best_match(self, req: Requirement, working_set: WorkingSet) -> Distribution: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user