mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Fix inconsistent self/cls parameter names (#2838)
Fixed several inconsistent parameter names so all instance methods take 'self' and all class methods take 'cls'. This avoids warnings or errors from linting tools that enforce standard naming conventions.
This commit is contained in:
committed by
Sebastian Rittau
parent
20b3b54460
commit
06c682449f
2
third_party/2and3/flask/views.pyi
vendored
2
third_party/2and3/flask/views.pyi
vendored
@@ -16,7 +16,7 @@ class View:
|
||||
def as_view(cls, name: Any, *class_args: Any, **class_kwargs: Any): ...
|
||||
|
||||
class MethodViewType(type):
|
||||
def __init__(cls, name: Any, bases: Any, d: Any) -> None: ...
|
||||
def __init__(self, name: Any, bases: Any, d: Any) -> None: ...
|
||||
|
||||
class MethodView(View, metaclass=MethodViewType):
|
||||
def dispatch_request(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
|
||||
@@ -16,7 +16,7 @@ class Error(Exception): ...
|
||||
class TypeTransformationError(Error): ...
|
||||
|
||||
class DescriptorMetaclass(type):
|
||||
def __instancecheck__(cls, obj): ...
|
||||
def __instancecheck__(self, obj): ...
|
||||
|
||||
class DescriptorBase(metaclass=DescriptorMetaclass):
|
||||
has_options = ... # type: Any
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class GeneratedProtocolMessageType(type):
|
||||
def __new__(cls, name, bases, dictionary): ...
|
||||
def __init__(cls, name, bases, dictionary) -> None: ...
|
||||
def __init__(self, name, bases, dictionary) -> None: ...
|
||||
|
||||
def ParseMessage(descriptor, byte_str): ...
|
||||
def MakeClass(descriptor): ...
|
||||
|
||||
4
third_party/2and3/jinja2/compiler.pyi
vendored
4
third_party/2and3/jinja2/compiler.pyi
vendored
@@ -137,8 +137,8 @@ class CodeGenerator(NodeVisitor):
|
||||
def visit_Tuple(self, node, frame): ...
|
||||
def visit_List(self, node, frame): ...
|
||||
def visit_Dict(self, node, frame): ...
|
||||
def binop(operator, interceptable: bool = ...): ...
|
||||
def uaop(operator, interceptable: bool = ...): ...
|
||||
def binop(self, interceptable: bool = ...): ...
|
||||
def uaop(self, interceptable: bool = ...): ...
|
||||
visit_Add = ... # type: Any
|
||||
visit_Sub = ... # type: Any
|
||||
visit_Mul = ... # type: Any
|
||||
|
||||
2
third_party/2and3/pynamodb/attributes.pyi
vendored
2
third_party/2and3/pynamodb/attributes.pyi
vendored
@@ -73,7 +73,7 @@ class NullAttribute(Attribute[None]):
|
||||
def __get__(self, instance: Any, owner: Any) -> None: ...
|
||||
|
||||
class MapAttributeMeta(type):
|
||||
def __init__(cls, name, bases, attrs) -> None: ...
|
||||
def __init__(self, name, bases, attrs) -> None: ...
|
||||
|
||||
class MapAttribute(Generic[_KT, _VT], Attribute[Mapping[_KT, _VT]], metaclass=MapAttributeMeta):
|
||||
attribute_values: Any
|
||||
|
||||
2
third_party/2and3/pynamodb/indexes.pyi
vendored
2
third_party/2and3/pynamodb/indexes.pyi
vendored
@@ -1,7 +1,7 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
class IndexMeta(type):
|
||||
def __init__(cls, name, bases, attrs) -> None: ...
|
||||
def __init__(self, name, bases, attrs) -> None: ...
|
||||
|
||||
class Index(metaclass=IndexMeta):
|
||||
Meta: Any
|
||||
|
||||
@@ -41,7 +41,7 @@ class HTTPResponse(io.IOBase):
|
||||
def read(self, amt=..., decode_content=..., cache_content=...): ...
|
||||
def stream(self, amt=..., decode_content=...): ...
|
||||
@classmethod
|
||||
def from_httplib(ResponseCls, r, **response_kw): ...
|
||||
def from_httplib(cls, r, **response_kw): ...
|
||||
def getheaders(self): ...
|
||||
def getheader(self, name, default=...): ...
|
||||
def close(self): ...
|
||||
|
||||
2
third_party/2and3/yaml/__init__.pyi
vendored
2
third_party/2and3/yaml/__init__.pyi
vendored
@@ -34,7 +34,7 @@ def add_representer(data_type, representer, Dumper=...): ...
|
||||
def add_multi_representer(data_type, multi_representer, Dumper=...): ...
|
||||
|
||||
class YAMLObjectMetaclass(type):
|
||||
def __init__(cls, name, bases, kwds) -> None: ...
|
||||
def __init__(self, name, bases, kwds) -> None: ...
|
||||
|
||||
class YAMLObject(metaclass=YAMLObjectMetaclass):
|
||||
yaml_loader = ... # type: Any
|
||||
|
||||
Reference in New Issue
Block a user