Metadata-Version: 2.3
Name: is_annotated
Version: 1.0.1
Summary: Check if an object is an `Annotated` type.
Project-URL: Bug Tracker, https://github.com/GalacticDynamics/is_annotated/issues
Project-URL: Changelog, https://github.com/GalacticDynamics/is_annotated/releases
Project-URL: Discussions, https://github.com/GalacticDynamics/is_annotated/discussions
Project-URL: Homepage, https://github.com/GalacticDynamics/is_annotated
Author-email: Nathaniel Starkman <nstarman@users.noreply.github.com>
License: Copyright 2024 Nathaniel Starkman
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
        of the Software, and to permit persons to whom the Software is furnished to do
        so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: typing-extensions>=4.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=3; extra == 'dev'
Requires-Dist: pytest-github-actions-annotate-failures; extra == 'dev'
Requires-Dist: pytest>=6; extra == 'dev'
Requires-Dist: sybil; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-cov>=3; extra == 'test'
Requires-Dist: pytest-github-actions-annotate-failures; extra == 'test'
Requires-Dist: pytest>=6; extra == 'test'
Requires-Dist: sybil; extra == 'test'
Description-Content-Type: text/markdown

<h1 align='center'> <code>is_annotated</code> </h1>
<h2 align="center">Check if an object is an <code>Annotated</code> type.</h2>

This is a micro-package, containing the single function `isannotated` to check
if a type hint is an `Annotated` type. `Annotated` objects can't be checked by
normal `isinstance` checks.

## Installation

[![PyPI platforms][pypi-platforms]][pypi-link]
[![PyPI version][pypi-version]][pypi-link]

```bash
pip install is_annotated
```

## Documentation

[![Actions Status][actions-badge]][actions-link]

```python
from typing import Annotated
from is_annotated import isannotated

print(isannotated(1))
# False

print(isannotated(int))
# False

print(isannotated(Annotated[int, "1"]))
# True
```

<!-- prettier-ignore-start -->
[actions-badge]:            https://github.com/GalacticDynamics/is_annotated/workflows/CI/badge.svg
[actions-link]:             https://github.com/GalacticDynamics/is_annotated/actions
[conda-badge]:              https://img.shields.io/conda/vn/conda-forge/is_annotated
[conda-link]:               https://github.com/conda-forge/is_annotated-feedstock
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
[github-discussions-link]:  https://github.com/GalacticDynamics/is_annotated/discussions
[pypi-link]:                https://pypi.org/project/is_annotated/
[pypi-platforms]:           https://img.shields.io/pypi/pyversions/is_annotated
[pypi-version]:             https://img.shields.io/pypi/v/is_annotated

<!-- prettier-ignore-end -->
