mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Replace object | None with object (#9857)
All types, including `None`, are a subtype of `object`, so `None` is redundant in the union `object | None`.
This commit is contained in:
@@ -20,7 +20,7 @@ class ConsoleMenu:
|
||||
exit_item: ExitItem
|
||||
current_option: int
|
||||
selected_option: int
|
||||
returned_value: object | None
|
||||
returned_value: object
|
||||
should_exit: bool
|
||||
previous_active_menu: ConsoleMenu | None
|
||||
def __init__(
|
||||
|
||||
@@ -50,7 +50,7 @@ def create_unbound_method(func: types.FunctionType, cls: type) -> types.Function
|
||||
Iterator = object
|
||||
|
||||
def get_method_function(meth: types.MethodType) -> types.FunctionType: ...
|
||||
def get_method_self(meth: types.MethodType) -> object | None: ...
|
||||
def get_method_self(meth: types.MethodType) -> object: ...
|
||||
def get_function_closure(fun: types.FunctionType) -> tuple[types._Cell, ...] | None: ...
|
||||
def get_function_code(fun: types.FunctionType) -> types.CodeType: ...
|
||||
def get_function_defaults(fun: types.FunctionType) -> tuple[Any, ...] | None: ...
|
||||
|
||||
Reference in New Issue
Block a user