Lines Matching refs:value

178     We append the repr() of the actual value (truncated to 100 chars).
706 """Special typing form to define literal types (a.k.a. value types).
709 variable or function parameter has a value equivalent to the provided
722 Literal[...] cannot be subclassed. At runtime, an arbitrary value
801 1. The return value is a boolean.
802 2. If the return value is ``True``, the type of its argument
2247 """Cast a value to a type.
2249 This returns the value unchanged. To the type checker this
2250 signals that the return value has the designated type, but at
2258 """Ask a static type checker to confirm that the value is of the given type.
2264 emits an error if the value is not of the specified type::
2331 for name, value in ann.items():
2332 if value is None:
2333 value = type(None)
2334 if isinstance(value, str):
2335 value = ForwardRef(value, is_argument=False, is_class=True)
2336 value = _eval_type(value, base_globals, base_locals)
2337 hints[name] = value
2362 for name, value in hints.items():
2363 if value is None:
2364 value = type(None)
2365 if isinstance(value, str):
2368 value = ForwardRef(
2369 value,
2373 hints[name] = _eval_type(value, globalns, localns)
2491 value = repr(arg)
2492 if len(value) > _ASSERT_NEVER_REPR_MAX_LENGTH:
2493 value = value[:_ASSERT_NEVER_REPR_MAX_LENGTH] + '...'
2494 raise AssertionError(f"Expected code to be unreachable, but got: {value}")
2568 def utf8(value: None) -> None: ...
2570 def utf8(value: bytes) -> bytes: ...
2572 def utf8(value: str) -> bytes: ...
2579 def utf8(value: None) -> None: ...
2581 def utf8(value: bytes) -> bytes: ...
2583 def utf8(value: str) -> bytes: ...
2584 def utf8(value):
2699 # NOTE: Mapping is only covariant in the value type.
3004 associated with a value of a consistent type. This expectation
3033 checker is only expected to support a literal False or True as the value of
3276 def __exit__(self, type, value, traceback) -> None: