Add mypy error codes to type: ignores, remove unused ignores (#7504)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Alex Waygood
2022-03-19 13:10:00 +00:00
committed by GitHub
parent 4308915e06
commit 340c6c97ed
67 changed files with 159 additions and 150 deletions

View File

@@ -53,9 +53,9 @@ def get_app_kwarg_dict(appInstance: _App | None = ...) -> _Options: ...
def flexible_str(obj: object) -> str | None: ...
def serialize_option(options_dict: _Options, key: str, upper: bool = ...) -> None: ...
@overload
def ensure_iterable(inst: str) -> list[str]: ... # type: ignore
def ensure_iterable(inst: str) -> list[str]: ... # type: ignore[misc]
@overload
def ensure_iterable(inst: _IterableT) -> _IterableT: ... # type: ignore
def ensure_iterable(inst: _IterableT) -> _IterableT: ...
@overload
def ensure_iterable(inst: _T) -> list[_T]: ...
def sanitize_regex_param(param: str | list[str]) -> list[str]: ...

View File

@@ -10,7 +10,7 @@ class _SybNumeric_pyodbc(sqltypes.Numeric):
class SybaseExecutionContext_pyodbc(SybaseExecutionContext):
def set_ddl_autocommit(self, connection, value) -> None: ...
class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect): # type: ignore # argument disparities between base classes
class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect):
supports_statement_cache: bool
colspecs: Any
@classmethod

View File

@@ -75,7 +75,7 @@ class ORMFromStatementCompileState(ORMCompileState):
@classmethod
def create_for_statement(cls, statement_container, compiler, **kw): ...
class ORMSelectCompileState(ORMCompileState, SelectState): # type: ignore # argument disparities between base classes
class ORMSelectCompileState(ORMCompileState, SelectState):
multi_row_eager_loaders: bool
compound_eager_adapter: Any
correlate: Any

View File

@@ -37,7 +37,7 @@ class Table(DialectKWArgs, SchemaItem, TableClause):
def tometadata(self, metadata, schema=..., referred_schema_fn: Any | None = ..., name: Any | None = ...): ...
def to_metadata(self, metadata, schema=..., referred_schema_fn: Any | None = ..., name: Any | None = ...): ...
class Column(DialectKWArgs, SchemaItem, ColumnClause): # type: ignore # argument disparities between base classes
class Column(DialectKWArgs, SchemaItem, ColumnClause):
__visit_name__: str
inherit_cache: bool
key: Any

View File

@@ -155,7 +155,7 @@ class SchemaType(SchemaEventTarget):
def create(self, bind: Any | None = ..., checkfirst: bool = ...) -> None: ...
def drop(self, bind: Any | None = ..., checkfirst: bool = ...) -> None: ...
class Enum(Emulated, String, SchemaType): # type: ignore # argument disparities between base classes
class Enum(Emulated, String, SchemaType):
__visit_name__: str
def __init__(self, *enums, **kw) -> None: ...
@property

View File

@@ -79,7 +79,7 @@ class NullTranslations(gettext.NullTranslations):
ugettext: Any
ungettext: Any
class Translations(NullTranslations, gettext.GNUTranslations): # type: ignore # argument disparities between base classes
class Translations(NullTranslations, gettext.GNUTranslations):
DEFAULT_DOMAIN: str
domain: Any
def __init__(self, fp: Any | None = ..., domain: Any | None = ...) -> None: ...

View File

@@ -74,7 +74,9 @@ class BeautifulSoup(Tag):
def handle_starttag(self, name, namespace, nsprefix, attrs, sourceline: Any | None = ..., sourcepos: Any | None = ...): ...
def handle_endtag(self, name, nsprefix: Any | None = ...) -> None: ...
def handle_data(self, data) -> None: ...
def decode(self, pretty_print: bool = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...): ... # type: ignore # missing some arguments
def decode( # type: ignore[override]
self, pretty_print: bool = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...
): ... # missing some arguments
class BeautifulStoneSoup(BeautifulSoup): ...
class StopParsing(Exception): ...

View File

@@ -7,7 +7,7 @@ class HTML5TreeBuilder(HTMLTreeBuilder):
features: Any
TRACKS_LINE_NUMBERS: bool
user_specified_encoding: Any
def prepare_markup( # type: ignore # user_specified_encoding doesn't have a default
def prepare_markup( # type: ignore[override] # user_specified_encoding doesn't have a default
self, markup, user_specified_encoding, document_declared_encoding: Any | None = ..., exclude_encodings: Any | None = ...
) -> None: ...
def feed(self, markup) -> None: ...
@@ -15,7 +15,7 @@ class HTML5TreeBuilder(HTMLTreeBuilder):
def create_treebuilder(self, namespaceHTMLElements): ...
def test_fragment_to_document(self, fragment): ...
class TreeBuilderForHtml5lib(Any): # type: ignore # html5lib.treebuilders.base.TreeBuilder
class TreeBuilderForHtml5lib(Any): # html5lib.treebuilders.base.TreeBuilder
soup: Any
parser: Any
store_line_numbers: Any
@@ -42,7 +42,7 @@ class AttrList:
def __getitem__(self, name): ...
def __contains__(self, name): ...
class Element(Any): # type: ignore # html5lib.treebuilders.base.Node
class Element(Any): # html5lib.treebuilders.base.Node
element: Any
soup: Any
namespace: Any

View File

@@ -19,7 +19,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
soup: Any
nsmaps: Any
def __init__(self, parser: Any | None = ..., empty_element_tags: Any | None = ..., **kwargs) -> None: ...
def prepare_markup( # type: ignore # the order of the parameters is different
def prepare_markup( # type: ignore[override] # the order of the parameters is different
self,
markup,
user_specified_encoding: Any | None = ...,
@@ -37,7 +37,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
def comment(self, content) -> None: ...
def test_fragment_to_document(self, fragment): ...
class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML): # type: ignore # argument disparities between base classes
class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
NAME: Any
ALTERNATE_NAMES: Any
features: Any

View File

@@ -19,12 +19,12 @@ class AttributeValueWithCharsetSubstitution(str): ...
class CharsetMetaAttributeValue(AttributeValueWithCharsetSubstitution):
def __new__(cls, original_value): ...
def encode(self, encoding: str) -> str: ... # type: ignore # incompatible with str
def encode(self, encoding: str) -> str: ... # type: ignore[override] # incompatible with str
class ContentMetaAttributeValue(AttributeValueWithCharsetSubstitution):
CHARSET_RE: Pattern[str]
def __new__(cls, original_value): ...
def encode(self, encoding: str) -> str: ... # type: ignore # incompatible with str
def encode(self, encoding: str) -> str: ... # type: ignore[override] # incompatible with str
_PageElementT = TypeVar("_PageElementT", bound=PageElement)
# The wrapping Union[] can be removed once mypy fully supports | in type aliases.

View File

@@ -64,7 +64,7 @@ class HmacAuthV4Handler(AuthHandler, HmacKeys):
def signature(self, http_request, string_to_sign): ...
def add_auth(self, req, **kwargs): ...
class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler): # type: ignore # argument disparities between base classes
class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler):
capability: Any
region_name: Any
def __init__(self, *args, **kwargs) -> None: ...

View File

@@ -166,7 +166,9 @@ class AWSQueryConnection(AWSAuthConnection):
provider: str = ...,
) -> None: ...
def get_utf8_value(self, value): ...
def make_request(self, action, params: Any | None = ..., path: str = ..., verb: str = ..., *args, **kwargs): ... # type: ignore # https://github.com/python/mypy/issues/1237
def make_request( # type: ignore[override]
self, action, params: Any | None = ..., path: str = ..., verb: str = ..., *args, **kwargs
): ...
def build_list_params(self, params, items, label): ...
def build_complex_list_params(self, params, items, label, names): ...
def get_list(self, action, params, markers, path: str = ..., parent: Any | None = ..., verb: str = ...): ...

View File

@@ -123,4 +123,17 @@ class S3Connection(AWSAuthConnection):
def lookup(self, bucket_name, validate: bool = ..., headers: dict[str, str] | None = ...): ...
def create_bucket(self, bucket_name, headers: dict[str, str] | None = ..., location: Any = ..., policy: Any | None = ...): ...
def delete_bucket(self, bucket, headers: dict[str, str] | None = ...): ...
def make_request(self, method, bucket: str = ..., key: str = ..., headers: Any | None = ..., data: str = ..., query_args: Any | None = ..., sender: Any | None = ..., override_num_retries: Any | None = ..., retry_handler: Any | None = ..., *args, **kwargs): ... # type: ignore # https://github.com/python/mypy/issues/1237
def make_request( # type: ignore[override]
self,
method,
bucket: str = ...,
key: str = ...,
headers: Any | None = ...,
data: str = ...,
query_args: Any | None = ...,
sender: Any | None = ...,
override_num_retries: Any | None = ...,
retry_handler: Any | None = ...,
*args,
**kwargs,
): ...

View File

@@ -275,7 +275,7 @@ class AsyncMockMixin(Base):
class AsyncMagicMixin(MagicMixin):
def __init__(self, *args: Any, **kw: Any) -> None: ...
class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock): ... # type: ignore # argument disparities between base classes
class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock): ...
class MagicProxy(Base):
name: str

View File

@@ -39,7 +39,7 @@ class BarChart(_BarChartBase):
self, gapWidth: int = ..., overlap: Any | None = ..., serLines: Any | None = ..., extLst: Any | None = ..., **kw
) -> None: ...
class BarChart3D(_BarChartBase, _3DBase): # type: ignore # incompatible base classes
class BarChart3D(_BarChartBase, _3DBase):
tagname: str
barDir: Any
grouping: Any

View File

@@ -30,7 +30,7 @@ class _SurfaceChartBase(ChartBase):
@abstractmethod
def tagname(self) -> str: ...
class SurfaceChart3D(_SurfaceChartBase, _3DBase): # type: ignore # incompatible base classes
class SurfaceChart3D(_SurfaceChartBase, _3DBase):
tagname: str
wireframe: Any
ser: Any

View File

@@ -27,14 +27,14 @@ class Expression(StrAndRepr):
class Literal(Expression):
literal: str
identity_tuple: tuple[str, str] # type: ignore
identity_tuple: tuple[str, str] # type: ignore[assignment]
def __init__(self, literal: str, name: str = ...) -> None: ...
class TokenMatcher(Literal): ...
class Regex(Expression):
re: Pattern[str]
identity_tuple: tuple[str, Pattern[str]] # type: ignore
identity_tuple: tuple[str, Pattern[str]] # type: ignore[assignment]
def __init__(
self,
pattern: str,

View File

@@ -44,7 +44,7 @@ class RuleVisitor(NodeVisitor):
def visit_spaceless_literal(self, spaceless_literal: Node, visited_children: typing.Sequence[Any]) -> Literal: ...
def visit_regex(self, node: Node, regex: typing.Sequence[Any]) -> Regex: ...
def visit_parenthesized(self, node: Node, parenthesized: typing.Sequence[Any]) -> Expression: ...
def generic_visit(self, node: Node, visited_children: typing.Sequence[Any]) -> typing.Sequence[Any] | Node: ... # type: ignore
def generic_visit(self, node: Node, visited_children: typing.Sequence[Any]) -> typing.Sequence[Any] | Node: ... # type: ignore[override]
class TokenRuleVisitor(RuleVisitor):
def visit_spaceless_literal(self, spaceless_literal: Node, visited_children: typing.Sequence[Any]) -> TokenMatcher: ...

View File

@@ -9,7 +9,7 @@ class _DummyCffiHasher:
salt_len: int
hash_len: int
class _Argon2Common( # type: ignore
class _Argon2Common( # type: ignore[misc]
uh.SubclassBackendMixin, uh.ParallelismMixin, uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler
):
name: str
@@ -82,5 +82,5 @@ class _CffiBackend(_Argon2Common):
class _PureBackend(_Argon2Common): ...
class argon2(_NoBackend, _Argon2Common): # type: ignore
class argon2(_NoBackend, _Argon2Common): # type: ignore[misc]
backends: Any

View File

@@ -2,7 +2,7 @@ from typing import Any
import passlib.utils.handlers as uh
class _BcryptCommon(uh.SubclassBackendMixin, uh.TruncateMixin, uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
class _BcryptCommon(uh.SubclassBackendMixin, uh.TruncateMixin, uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
checksum_size: int
@@ -34,7 +34,7 @@ class _PyBcryptBackend(_BcryptCommon): ...
class _OsCryptBackend(_BcryptCommon): ...
class _BuiltinBackend(_BcryptCommon): ...
class bcrypt(_NoBackend, _BcryptCommon): # type: ignore
class bcrypt(_NoBackend, _BcryptCommon): # type: ignore[misc]
backends: Any
class _wrapped_bcrypt(bcrypt):

View File

@@ -2,7 +2,7 @@ from typing import Any
import passlib.utils.handlers as uh
class cisco_pix(uh.HasUserContext, uh.StaticHandler): # type: ignore
class cisco_pix(uh.HasUserContext, uh.StaticHandler):
name: str
truncate_size: int
truncate_error: bool

View File

@@ -2,7 +2,7 @@ from typing import Any
import passlib.utils.handlers as uh
class des_crypt(uh.TruncateMixin, uh.HasManyBackends, uh.HasSalt, uh.GenericHandler): # type: ignore
class des_crypt(uh.TruncateMixin, uh.HasManyBackends, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
checksum_chars: Any
@@ -16,7 +16,7 @@ class des_crypt(uh.TruncateMixin, uh.HasManyBackends, uh.HasSalt, uh.GenericHand
def to_string(self): ...
backends: Any
class bsdi_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
class bsdi_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
checksum_size: int
@@ -35,7 +35,7 @@ class bsdi_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler
def using(cls, **kwds): ...
backends: Any
class bigcrypt(uh.HasSalt, uh.GenericHandler): # type: ignore
class bigcrypt(uh.HasSalt, uh.GenericHandler):
name: str
setting_kwds: Any
checksum_chars: Any
@@ -46,7 +46,7 @@ class bigcrypt(uh.HasSalt, uh.GenericHandler): # type: ignore
def from_string(cls, hash): ...
def to_string(self): ...
class crypt16(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type: ignore
class crypt16(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
checksum_size: int

View File

@@ -4,7 +4,7 @@ import passlib.utils.handlers as uh
from passlib.handlers.bcrypt import _wrapped_bcrypt
from passlib.ifc import DisabledHash
class DjangoSaltedHash(uh.HasSalt, uh.GenericHandler): # type: ignore
class DjangoSaltedHash(uh.HasSalt, uh.GenericHandler):
setting_kwds: Any
default_salt_size: ClassVar[int]
max_salt_size: Any
@@ -14,7 +14,7 @@ class DjangoSaltedHash(uh.HasSalt, uh.GenericHandler): # type: ignore
def from_string(cls, hash): ...
def to_string(self): ...
class DjangoVariableHash(uh.HasRounds, DjangoSaltedHash): # type: ignore
class DjangoVariableHash(uh.HasRounds, DjangoSaltedHash): # type: ignore[misc]
setting_kwds: Any
min_rounds: int
@classmethod
@@ -64,7 +64,7 @@ class django_pbkdf2_sha1(django_pbkdf2_sha256):
django_argon2: Any
class django_des_crypt(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type: ignore
class django_des_crypt(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
name: str
django_name: str
setting_kwds: Any
@@ -80,7 +80,7 @@ class django_des_crypt(uh.TruncateMixin, uh.HasSalt, uh.GenericHandler): # type
def from_string(cls, hash): ...
def to_string(self): ...
class django_disabled(DisabledHash, uh.StaticHandler): # type: ignore
class django_disabled(DisabledHash, uh.StaticHandler):
name: str
suffix_length: int
@classmethod

View File

@@ -2,7 +2,7 @@ from typing import Any, ClassVar
import passlib.utils.handlers as uh
class fshp(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
class fshp(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
checksum_chars: Any

View File

@@ -25,7 +25,7 @@ class _Base64DigestHelper(uh.StaticHandler):
ident: Any
checksum_chars: Any
class _SaltedBase64DigestHelper(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
class _SaltedBase64DigestHelper(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
setting_kwds: Any
checksum_chars: Any
ident: Any

View File

@@ -2,7 +2,7 @@ from typing import Any
import passlib.utils.handlers as uh
class _MD5_Common(uh.HasSalt, uh.GenericHandler): # type: ignore
class _MD5_Common(uh.HasSalt, uh.GenericHandler):
setting_kwds: Any
checksum_size: int
checksum_chars: Any
@@ -12,7 +12,7 @@ class _MD5_Common(uh.HasSalt, uh.GenericHandler): # type: ignore
def from_string(cls, hash): ...
def to_string(self): ...
class md5_crypt(uh.HasManyBackends, _MD5_Common): # type: ignore
class md5_crypt(uh.HasManyBackends, _MD5_Common):
name: str
ident: Any
backends: Any

View File

@@ -3,7 +3,7 @@ from typing import Any
import passlib.utils.handlers as uh
from passlib.ifc import DisabledHash
class unix_fallback(DisabledHash, uh.StaticHandler): # type: ignore
class unix_fallback(DisabledHash, uh.StaticHandler):
name: str
context_kwds: Any
@classmethod
@@ -13,7 +13,7 @@ class unix_fallback(DisabledHash, uh.StaticHandler): # type: ignore
@classmethod
def verify(cls, secret, hash, enable_wildcard: bool = ...): ... # type: ignore[override]
class unix_disabled(DisabledHash, uh.MinimalHandler): # type: ignore
class unix_disabled(DisabledHash, uh.MinimalHandler):
name: str
setting_kwds: Any
context_kwds: Any

View File

@@ -2,7 +2,7 @@ from typing import Any
import passlib.utils.handlers as uh
class mssql2000(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
class mssql2000(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
name: str
setting_kwds: Any
checksum_size: int
@@ -16,7 +16,7 @@ class mssql2000(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: i
@classmethod
def verify(cls, secret, hash): ...
class mssql2005(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
class mssql2005(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
name: str
setting_kwds: Any
checksum_size: int

View File

@@ -2,12 +2,12 @@ from typing import Any
import passlib.utils.handlers as uh
class oracle10(uh.HasUserContext, uh.StaticHandler): # type: ignore
class oracle10(uh.HasUserContext, uh.StaticHandler):
name: str
checksum_chars: Any
checksum_size: int
class oracle11(uh.HasSalt, uh.GenericHandler): # type: ignore
class oracle11(uh.HasSalt, uh.GenericHandler):
name: str
setting_kwds: Any
checksum_size: int

View File

@@ -3,7 +3,7 @@ from typing import Any, ClassVar
import passlib.utils.handlers as uh
from passlib.utils.handlers import PrefixWrapper
class Pbkdf2DigestHandler(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
class Pbkdf2DigestHandler(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
setting_kwds: Any
checksum_chars: Any
default_salt_size: ClassVar[int]
@@ -41,7 +41,7 @@ ldap_pbkdf2_sha1: PrefixWrapper
ldap_pbkdf2_sha256: PrefixWrapper
ldap_pbkdf2_sha512: PrefixWrapper
class cta_pbkdf2_sha1(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
class cta_pbkdf2_sha1(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
ident: Any
@@ -56,7 +56,7 @@ class cta_pbkdf2_sha1(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.Generic
def from_string(cls, hash): ...
def to_string(self): ...
class dlitz_pbkdf2_sha1(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
class dlitz_pbkdf2_sha1(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
ident: Any
@@ -71,7 +71,7 @@ class dlitz_pbkdf2_sha1(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: i
def from_string(cls, hash): ...
def to_string(self): ...
class atlassian_pbkdf2_sha1(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
class atlassian_pbkdf2_sha1(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler):
name: str
setting_kwds: Any
ident: Any
@@ -82,7 +82,7 @@ class atlassian_pbkdf2_sha1(uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler)
def from_string(cls, hash): ...
def to_string(self): ...
class grub_pbkdf2_sha512(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
class grub_pbkdf2_sha512(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
ident: Any

View File

@@ -2,7 +2,7 @@ from typing import Any
import passlib.utils.handlers as uh
class phpass(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
class phpass(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
checksum_chars: Any

View File

@@ -2,7 +2,7 @@ from typing import Any
import passlib.utils.handlers as uh
class postgres_md5(uh.HasUserContext, uh.StaticHandler): # type: ignore
class postgres_md5(uh.HasUserContext, uh.StaticHandler):
name: str
checksum_chars: Any
checksum_size: int

View File

@@ -2,7 +2,7 @@ from typing import Any, ClassVar
import passlib.utils.handlers as uh
class scram(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore
class scram(uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
ident: Any

View File

@@ -2,7 +2,7 @@ from typing import Any, ClassVar
import passlib.utils.handlers as uh
class scrypt(uh.ParallelismMixin, uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.HasManyIdents, uh.GenericHandler): # type: ignore
class scrypt(uh.ParallelismMixin, uh.HasRounds, uh.HasRawSalt, uh.HasRawChecksum, uh.HasManyIdents, uh.GenericHandler): # type: ignore[misc]
backends: ClassVar[tuple[str, ...]]
name: str
setting_kwds: Any

View File

@@ -4,7 +4,7 @@ import passlib.utils.handlers as uh
log: Any
class sha1_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
class sha1_crypt(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
ident: Any

View File

@@ -2,7 +2,7 @@ from typing import Any
import passlib.utils.handlers as uh
class _SHA2_Common(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
class _SHA2_Common(uh.HasManyBackends, uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
setting_kwds: Any
checksum_chars: Any
max_salt_size: int

View File

@@ -2,7 +2,7 @@ from typing import Any, ClassVar
import passlib.utils.handlers as uh
class sun_md5_crypt(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore
class sun_md5_crypt(uh.HasRounds, uh.HasSalt, uh.GenericHandler): # type: ignore[misc]
name: str
setting_kwds: Any
checksum_chars: Any

View File

@@ -2,7 +2,7 @@ from typing import Any
import passlib.utils.handlers as uh
class lmhash(uh.TruncateMixin, uh.HasEncodingContext, uh.StaticHandler): # type: ignore
class lmhash(uh.TruncateMixin, uh.HasEncodingContext, uh.StaticHandler):
name: str
setting_kwds: Any
checksum_chars: Any
@@ -23,14 +23,14 @@ class nthash(uh.StaticHandler):
bsd_nthash: Any
class msdcc(uh.HasUserContext, uh.StaticHandler): # type: ignore
class msdcc(uh.HasUserContext, uh.StaticHandler):
name: str
checksum_chars: Any
checksum_size: int
@classmethod
def raw(cls, secret, user): ...
class msdcc2(uh.HasUserContext, uh.StaticHandler): # type: ignore
class msdcc2(uh.HasUserContext, uh.StaticHandler):
name: str
checksum_chars: Any
checksum_size: int

View File

@@ -148,7 +148,7 @@ class BackendMixin(PasswordHash, metaclass=abc.ABCMeta):
def set_backend(cls, name: str = ..., dryrun: bool = ...): ...
class SubclassBackendMixin(BackendMixin, metaclass=abc.ABCMeta): ...
class HasManyBackends(BackendMixin, GenericHandler): ... # type: ignore
class HasManyBackends(BackendMixin, GenericHandler): ...
class PrefixWrapper:
name: Any

View File

@@ -33,7 +33,7 @@ class _BaseFile(list[_TB]):
metadata_is_fuzzy: bool
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def __unicode__(self) -> Text: ...
def __contains__(self, entry: _TB) -> bool: ... # type: ignore # AttributeError otherwise
def __contains__(self, entry: _TB) -> bool: ... # type: ignore[override] # AttributeError otherwise
def __eq__(self, other: object) -> bool: ...
def append(self, entry: _TB) -> None: ...
def insert(self, index: SupportsIndex, entry: _TB) -> None: ...
@@ -60,7 +60,7 @@ class MOFile(_BaseFile[MOEntry]):
version: int
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def save_as_pofile(self, fpath: str) -> None: ...
def save(self, fpath: Text | None = ...) -> None: ... # type: ignore # binary file does not allow argument repr_method
def save(self, fpath: Text | None = ...) -> None: ... # type: ignore[override] # binary file does not allow argument repr_method
def percent_translated(self) -> int: ...
def translated_entries(self) -> list[MOEntry]: ...
def untranslated_entries(self) -> list[MOEntry]: ...