mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-12 19:12:31 +08:00
Import names from typing directly rather than importing module (#13761)
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
import re
|
||||
from typing import ClassVar
|
||||
from typing import ClassVar, TypeVar
|
||||
|
||||
import click
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class EmailParamType(click.ParamType):
|
||||
EMAIL_REGEX: ClassVar[re.Pattern[str]]
|
||||
def convert(self, value: str, param: click.Parameter | None, ctx: click.Context | None) -> str | None: ...
|
||||
def convert(self, value: str, param: click.Parameter | None, ctx: click.Context | None) -> str: ...
|
||||
|
||||
class PasswordParamType(click.ParamType):
|
||||
def convert(self, value: str, param: click.Parameter | None, ctx: click.Context | None) -> str | None: ...
|
||||
def convert(self, value: _T, param: click.Parameter | None, ctx: click.Context | None) -> _T: ...
|
||||
|
||||
class TextAreaParamType(click.ParamType):
|
||||
def convert(self, value: str, param: click.Parameter | None, ctx: click.Context | None) -> str | None: ...
|
||||
def convert(self, value: _T, param: click.Parameter | None, ctx: click.Context | None) -> _T: ...
|
||||
|
||||
EMAIL_TYPE: EmailParamType
|
||||
PASSWORD_TYPE: PasswordParamType
|
||||
|
||||
Reference in New Issue
Block a user