Skip to content

Commit

Permalink
Correct several positional-only differences in third-party stubs (#7352)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Feb 22, 2022
1 parent 69abe56 commit 64af11c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion stubs/contextvars/contextvars.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ class Context(Mapping[ContextVar[Any], Any]):
def __init__(self) -> None: ...
def run(self, callable: Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ...
def copy(self) -> Context: ...
def __getitem__(self, key: ContextVar[_T]) -> _T: ...
def __getitem__(self, __key: ContextVar[_T]) -> _T: ...
def __iter__(self) -> Iterator[ContextVar[Any]]: ...
def __len__(self) -> int: ...
2 changes: 1 addition & 1 deletion stubs/frozendict/frozendict.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class frozendict(Mapping[_KT, _VT], Generic[_KT, _VT]):
@overload
def __init__(self, iterable: Iterable[tuple[_KT, _VT]]) -> None: ...
def __getitem__(self, key: _KT) -> _VT: ...
def __contains__(self, key: object) -> bool: ...
def __contains__(self, __key: object) -> bool: ...
def copy(self: Self, **add_or_replace: _VT) -> Self: ...
def __iter__(self) -> Iterator[_KT]: ...
def __len__(self) -> int: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/mock/mock/mock.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class _Call(tuple[Any, ...]):
self, value: Any = ..., name: Any | None = ..., parent: Any | None = ..., two: bool = ..., from_kall: bool = ...
) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...
def __ne__(self, __other: object) -> bool: ...
def __call__(self, *args: Any, **kwargs: Any) -> _Call: ...
def __getattr__(self, attr: str) -> Any: ...
@property
Expand Down
8 changes: 4 additions & 4 deletions stubs/mysqlclient/MySQLdb/_mysql.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class connection:
def thread_id(self, *args, **kwargs) -> Any: ...
def use_result(self, *args, **kwargs) -> Any: ...
def warning_count(self, *args, **kwargs) -> Any: ...
def __delattr__(self, name) -> Any: ...
def __setattr__(self, name, value) -> Any: ...
def __delattr__(self, __name) -> Any: ...
def __setattr__(self, __name, __value) -> Any: ...

class result:
converter: Any
Expand All @@ -76,8 +76,8 @@ class result:
def field_flags(self, *args, **kwargs) -> Any: ...
def num_fields(self, *args, **kwargs) -> Any: ...
def num_rows(self, *args, **kwargs) -> Any: ...
def __delattr__(self, name) -> Any: ...
def __setattr__(self, name, value) -> Any: ...
def __delattr__(self, __name) -> Any: ...
def __setattr__(self, __name, __value) -> Any: ...

def connect(*args, **kwargs) -> Any: ...
def debug(*args, **kwargs) -> Any: ...
Expand Down
30 changes: 15 additions & 15 deletions stubs/psycopg2/psycopg2/_psycopg.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ class Column:
table_oid: Any
type_code: Any
def __init__(self, *args, **kwargs) -> None: ...
def __eq__(self, other): ...
def __ge__(self, other): ...
def __getitem__(self, index): ...
def __eq__(self, __other): ...
def __ge__(self, __other): ...
def __getitem__(self, __index): ...
def __getstate__(self): ...
def __gt__(self, other): ...
def __le__(self, other): ...
def __gt__(self, __other): ...
def __le__(self, __other): ...
def __len__(self): ...
def __lt__(self, other): ...
def __ne__(self, other): ...
def __lt__(self, __other): ...
def __ne__(self, __other): ...
def __setstate__(self, state): ...

class ConnectionInfo:
Expand Down Expand Up @@ -202,15 +202,15 @@ class Notify:
payload: Any
pid: Any
def __init__(self, *args, **kwargs) -> None: ...
def __eq__(self, other): ...
def __ge__(self, other): ...
def __getitem__(self, index): ...
def __gt__(self, other): ...
def __eq__(self, __other): ...
def __ge__(self, __other): ...
def __getitem__(self, __index): ...
def __gt__(self, __other): ...
def __hash__(self): ...
def __le__(self, other): ...
def __le__(self, __other): ...
def __len__(self): ...
def __lt__(self, other): ...
def __ne__(self, other): ...
def __lt__(self, __other): ...
def __ne__(self, __other): ...

class OperationalError(psycopg2.DatabaseError): ...
class ProgrammingError(psycopg2.DatabaseError): ...
Expand Down Expand Up @@ -265,7 +265,7 @@ class Xid:
prepared: Any
def __init__(self, *args, **kwargs) -> None: ...
def from_string(self, *args, **kwargs): ...
def __getitem__(self, index): ...
def __getitem__(self, __index): ...
def __len__(self): ...

_cursor = cursor
Expand Down
2 changes: 1 addition & 1 deletion stubs/requests/requests/structures.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ class LookupDict(dict[str, _VT]):
def __init__(self, name: Any = ...) -> None: ...
def __getitem__(self, key: str) -> _VT | None: ... # type: ignore[override]
def __getattr__(self, attr: str) -> _VT: ...
def __setattr__(self, attr: str, value: _VT) -> None: ...
def __setattr__(self, __attr: str, __value: _VT) -> None: ...

0 comments on commit 64af11c

Please sign in to comment.