This package provides PEP 561 compatible type stubs for the `first` library. It enables static type checkers like MyPy to correctly analyze code that uses the `first` function, enhancing code quality and preventing type-related errors. The current version is 2.0.5.20260408, and it's released as part of the `typeshed` project, which updates periodically.
pip install types-firstVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use the `first` function with type hints. Installing `types-first` allows static analysis tools like MyPy to verify the types, such as ensuring `get_first_even` correctly handles `Optional[int]`.
Always install both `first` and `types-first`: `pip install first types-first`.
Ensure both `first` and `types-first` are updated regularly. If encountering type errors, check the `typeshed` GitHub repository for the latest status or specific issues related to `first` stubs.
Do not attempt to import `types_first`. Continue to import the actual runtime library: `from first import first`.