mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-27 20:12:21 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
class CORSRule:
|
||||
allowed_method: Any
|
||||
@@ -20,7 +20,7 @@ class CORSRule:
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self) -> str: ...
|
||||
|
||||
class CORSConfiguration(List[CORSRule]):
|
||||
class CORSConfiguration(list[CORSRule]):
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self) -> str: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
class Rule:
|
||||
id: Any
|
||||
@@ -33,7 +33,7 @@ class Transition:
|
||||
def __init__(self, days: Any | None = ..., date: Any | None = ..., storage_class: Any | None = ...) -> None: ...
|
||||
def to_xml(self): ...
|
||||
|
||||
class Transitions(List[Transition]):
|
||||
class Transitions(list[Transition]):
|
||||
transition_properties: int
|
||||
current_transition_property: int
|
||||
temp_days: Any
|
||||
@@ -51,7 +51,7 @@ class Transitions(List[Transition]):
|
||||
@property
|
||||
def storage_class(self): ...
|
||||
|
||||
class Lifecycle(List[Rule]):
|
||||
class Lifecycle(list[Rule]):
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
class Tag:
|
||||
key: Any
|
||||
@@ -9,13 +9,13 @@ class Tag:
|
||||
def to_xml(self): ...
|
||||
def __eq__(self, other): ...
|
||||
|
||||
class TagSet(List[Tag]):
|
||||
class TagSet(list[Tag]):
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def add_tag(self, key, value): ...
|
||||
def to_xml(self): ...
|
||||
|
||||
class Tags(List[TagSet]):
|
||||
class Tags(list[TagSet]):
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
def to_xml(self): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
def tag(key, value): ...
|
||||
|
||||
@@ -33,7 +33,7 @@ class RedirectLocation(_XMLKeyValue):
|
||||
def __init__(self, hostname: Any | None = ..., protocol: Any | None = ...) -> None: ...
|
||||
def to_xml(self): ...
|
||||
|
||||
class RoutingRules(List[RoutingRule]):
|
||||
class RoutingRules(list[RoutingRule]):
|
||||
def add_rule(self, rule: RoutingRule) -> RoutingRules: ...
|
||||
def startElement(self, name, attrs, connection): ...
|
||||
def endElement(self, name, value, connection): ...
|
||||
|
||||
@@ -3,7 +3,7 @@ import logging.handlers
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from typing import IO, Any, Callable, ContextManager, Dict, Iterable, Mapping, Sequence, Type, TypeVar
|
||||
from typing import IO, Any, Callable, ContextManager, Iterable, Mapping, Sequence, Type, TypeVar
|
||||
|
||||
import boto.connection
|
||||
|
||||
@@ -50,7 +50,7 @@ def merge_meta(
|
||||
def get_aws_metadata(headers: Mapping[str, str], provider: _Provider | None = ...) -> Mapping[str, str]: ...
|
||||
def retry_url(url: str, retry_on_404: bool = ..., num_retries: int = ..., timeout: int | None = ...) -> str: ...
|
||||
|
||||
class LazyLoadMetadata(Dict[_KT, _VT]):
|
||||
class LazyLoadMetadata(dict[_KT, _VT]):
|
||||
def __init__(self, url: str, num_retries: int, timeout: int | None = ...) -> None: ...
|
||||
|
||||
def get_instance_metadata(
|
||||
@@ -101,7 +101,7 @@ class AuthSMTPHandler(logging.handlers.SMTPHandler):
|
||||
self, mailhost: str, username: str, password: str, fromaddr: str, toaddrs: Sequence[str], subject: str
|
||||
) -> None: ...
|
||||
|
||||
class LRUCache(Dict[_KT, _VT]):
|
||||
class LRUCache(dict[_KT, _VT]):
|
||||
class _Item:
|
||||
previous: LRUCache._Item | None
|
||||
next: LRUCache._Item | None
|
||||
|
||||
Reference in New Issue
Block a user