Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all __nonzero__ methods #8443

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions stubs/SQLAlchemy/sqlalchemy/event/attr.pyi
Expand Up @@ -46,7 +46,6 @@ class _EmptyListener(_InstanceLevelDispatch):
def __len__(self): ...
def __iter__(self): ...
def __bool__(self): ...
__nonzero__: Any

class _CompoundListener(_InstanceLevelDispatch):
def exec_once(self, *args, **kw) -> None: ...
Expand All @@ -55,7 +54,6 @@ class _CompoundListener(_InstanceLevelDispatch):
def __len__(self): ...
def __iter__(self): ...
def __bool__(self): ...
__nonzero__: Any

class _ListenerCollection(_CompoundListener):
parent_listeners: Any
Expand Down
2 changes: 0 additions & 2 deletions stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi
Expand Up @@ -97,7 +97,6 @@ class _AssociationCollection:
def col(self): ...
def __len__(self): ...
def __bool__(self): ...
__nonzero__: Any

class _AssociationList(_AssociationCollection):
def __getitem__(self, index): ...
Expand Down Expand Up @@ -163,7 +162,6 @@ class _AssociationDict(_AssociationCollection):
class _AssociationSet(_AssociationCollection):
def __len__(self): ...
def __bool__(self): ...
__nonzero__: Any
def __contains__(self, value): ...
def __iter__(self): ...
def add(self, value) -> None: ...
Expand Down
1 change: 0 additions & 1 deletion stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi
Expand Up @@ -208,7 +208,6 @@ def backref_listeners(attribute, key, uselist): ...

class History:
def __bool__(self): ...
__nonzero__: Any
def empty(self): ...
def sum(self): ...
def non_deleted(self): ...
Expand Down
1 change: 0 additions & 1 deletion stubs/SQLAlchemy/sqlalchemy/orm/collections.pyi
Expand Up @@ -74,7 +74,6 @@ class CollectionAdapter:
def __iter__(self): ...
def __len__(self): ...
def __bool__(self): ...
__nonzero__: Any
def fire_append_wo_mutation_event(self, item, initiator: Any | None = ...): ...
def fire_append_event(self, item, initiator: Any | None = ...): ...
def fire_remove_event(self, item, initiator: Any | None = ...) -> None: ...
Expand Down
1 change: 0 additions & 1 deletion stubs/SQLAlchemy/sqlalchemy/orm/dynamic.pyi
Expand Up @@ -51,7 +51,6 @@ class DynamicCollectionAdapter:
def __iter__(self): ...
def __len__(self): ...
def __bool__(self): ...
__nonzero__: Any

class AppenderMixin:
query_class: Any
Expand Down
1 change: 0 additions & 1 deletion stubs/SQLAlchemy/sqlalchemy/orm/instrumentation.pyi
Expand Up @@ -58,7 +58,6 @@ class ClassManager(HasMemoized, dict[Any, Any]):
def has_state(self, instance): ...
def has_parent(self, state, key, optimistic: bool = ...): ...
def __bool__(self): ...
__nonzero__: Any

class _SerializeManager:
class_: Any
Expand Down
1 change: 0 additions & 1 deletion stubs/SQLAlchemy/sqlalchemy/orm/path_registry.pyi
Expand Up @@ -94,7 +94,6 @@ class AbstractEntityRegistry(PathRegistry):
@property
def mapper(self): ...
def __bool__(self): ...
__nonzero__: Any
def __getitem__(self, entity): ...

class SlotsEntityRegistry(AbstractEntityRegistry):
Expand Down
2 changes: 0 additions & 2 deletions stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi
Expand Up @@ -34,7 +34,6 @@ class ClauseElement(roles.SQLRole, SupportsWrappingAnnotations, MemoizedHasCache
def compile(self, bind: Any | None = ..., dialect: Any | None = ..., **kw): ...
def __invert__(self): ...
def __bool__(self) -> None: ...
__nonzero__: Any

class ColumnElement(
roles.ColumnArgumentOrKeyRole,
Expand Down Expand Up @@ -285,7 +284,6 @@ class BinaryExpression(ColumnElement[Any]):
self, left, right, operator, type_: Any | None = ..., negate: Any | None = ..., modifiers: Any | None = ...
) -> None: ...
def __bool__(self): ...
__nonzero__: Any
@property
def is_comparison(self): ...
def self_group(self, against: Any | None = ...): ...
Expand Down
1 change: 0 additions & 1 deletion stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi
Expand Up @@ -107,7 +107,6 @@ class PyWrapper(ColumnOperators[_T], Generic[_T]):
def reverse_operate(self, op, other, **kwargs): ...
def __clause_element__(self): ...
def __bool__(self): ...
def __nonzero__(self): ...
def __getattribute__(self, key): ...
def __iter__(self): ...
def __getitem__(self, key) -> ColumnOperators[_T]: ...
Expand Down
3 changes: 1 addition & 2 deletions stubs/babel/babel/messages/pofile.pyi
Expand Up @@ -13,8 +13,7 @@ class _NormalizedString:
def __init__(self, *args) -> None: ...
def append(self, s) -> None: ...
def denormalize(self): ...
def __nonzero__(self): ...
__bool__: Any
def __bool__(self): ...
def __cmp__(self, other): ...
def __gt__(self, other): ...
def __lt__(self, other): ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/babel/babel/support.pyi
Expand Up @@ -20,7 +20,7 @@ class LazyProxy:
@property
def value(self): ...
def __contains__(self, key): ...
def __nonzero__(self): ...
def __bool__(self): ...
def __dir__(self): ...
def __iter__(self): ...
def __len__(self): ...
Expand Down
1 change: 0 additions & 1 deletion stubs/invoke/invoke/runners.pyi
Expand Up @@ -183,7 +183,6 @@ class Result:
) -> None: ...
@property
def return_code(self) -> int: ...
def __nonzero__(self) -> bool: ...
def __bool__(self) -> bool: ...
@property
def ok(self) -> bool: ...
Expand Down
1 change: 0 additions & 1 deletion stubs/psycopg2/psycopg2/_range.pyi
Expand Up @@ -18,7 +18,6 @@ class Range:
def upper_inc(self): ...
def __contains__(self, x): ...
def __bool__(self): ...
def __nonzero__(self): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
def __hash__(self): ...
Expand Down
1 change: 0 additions & 1 deletion stubs/python-dateutil/dateutil/relativedelta.pyi
Expand Up @@ -88,7 +88,6 @@ class relativedelta:
def __sub__(self: Self, other: relativedelta) -> Self: ...
def __neg__(self: Self) -> Self: ...
def __bool__(self) -> bool: ...
def __nonzero__(self) -> bool: ...
def __mul__(self: Self, other: SupportsFloat) -> Self: ...
def __rmul__(self: Self, other: SupportsFloat) -> Self: ...
def __eq__(self, other: object) -> bool: ...
Expand Down
1 change: 0 additions & 1 deletion stubs/redis/redis/cluster.pyi
Expand Up @@ -190,7 +190,6 @@ class ClusterPipeline(RedisCluster[_StrType], Generic[_StrType]):
**kwargs,
) -> None: ...
def __len__(self) -> int: ...
def __nonzero__(self) -> Literal[True]: ...
def __bool__(self) -> Literal[True]: ...
def execute_command(self, *args, **kwargs): ...
def pipeline_execute_command(self, *args, **options): ...
Expand Down
1 change: 0 additions & 1 deletion stubs/requests/requests/models.pyi
Expand Up @@ -104,7 +104,6 @@ class Response:
request: PreparedRequest
def __init__(self) -> None: ...
def __bool__(self) -> bool: ...
def __nonzero__(self) -> bool: ...
def __iter__(self) -> Iterator[bytes]: ...
def __enter__(self: Self) -> Self: ...
def __exit__(self, *args: object) -> None: ...
Expand Down
1 change: 0 additions & 1 deletion stubs/tqdm/tqdm/std.pyi
Expand Up @@ -193,7 +193,6 @@ class tqdm(Generic[_T], Iterable[_T], Comparable):
start_t: Incomplete

def __bool__(self) -> bool: ...
def __nonzero__(self) -> bool: ...
def __len__(self) -> int: ...
def __reversed__(self) -> Iterator[_T]: ...
def __contains__(self, item: object) -> bool: ...
Expand Down
6 changes: 2 additions & 4 deletions stubs/waitress/waitress/buffers.pyi
Expand Up @@ -10,8 +10,7 @@ class FileBasedBuffer:
file: BytesIO = ...
def __init__(self, file: BytesIO, from_buffer: BytesIO | None = ...) -> None: ...
def __len__(self) -> int: ...
def __nonzero__(self) -> bool: ...
__bool__: Callable[[], bool] = ...
def __bool__(self) -> bool: ...
def append(self, s: Any) -> None: ...
def get(self, numbytes: int = ..., skip: bool = ...) -> bytes: ...
def skip(self, numbytes: int, allow_prune: int = ...) -> None: ...
Expand Down Expand Up @@ -48,8 +47,7 @@ class OverflowableBuffer:
overflow: int = ...
def __init__(self, overflow: int) -> None: ...
def __len__(self) -> int: ...
def __nonzero__(self) -> bool: ...
__bool__: Callable[[], bool] = ...
def __bool__(self) -> bool: ...
def append(self, s: bytes) -> None: ...
def get(self, numbytes: int = ..., skip: bool = ...) -> bytes: ...
def skip(self, numbytes: int, allow_prune: bool = ...) -> None: ...
Expand Down