https://github.com/codeforreal1/python-typechecking
Type Checking in Python with ty
https://github.com/codeforreal1/python-typechecking
Last synced: 12 months ago
JSON representation
Type Checking in Python with ty
- Host: GitHub
- URL: https://github.com/codeforreal1/python-typechecking
- Owner: codeforreal1
- Created: 2025-06-21T05:38:03.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-21T09:06:59.000Z (12 months ago)
- Last Synced: 2025-06-21T10:20:11.945Z (12 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Type Checking in Python with [ty](https://github.com/astral-sh/ty)
Run:
```
uv run ./src/.py
```
#### Basic
| Description | Syntax |
| ------------- | ------- |
| String | `str` |
| Integer | `int` |
| Float/Decimal | `float` |
| Boolean | `bool` |
| Bytes | `bytes` |
| Void/Null | `None` |
#### Collection
| Description | Syntax |
| ----------- | -------------------- |
| List | `List[T]` |
| Dictionary | `Dict[K, V]` |
| Set | `Set[T]` |
| Tuple | `Tuple[T1, T2, ...]` |
| Iterable | `Iterable[T]` |
| Sequence | `Sequence[T]` |
#### Other
| Description | Syntax |
| ----------- | -------------------- |
| Literal | `Literal[T]` |
| Union | `Union[T1, T2, ...]` |
| Optional | `Optional[T]` |
| TypedDict | `TypedDict` |
| Self | `Self` |
| Final | `Final` |
| Any | `Any` |