Metadata-Version: 2.3
Name: flake8-frozen-collections
Version: 0.0.1
Summary: Flake8 plugin that requires frozendict and frozenset instead of dict and set
License: MIT
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: flake8 (>=7.0.0)
Project-URL: Repository, https://github.com/moment/flake8-frozen-collections
Description-Content-Type: text/markdown

# flake8-frozen-collections

A Flake8 plugin that prohibits the use of mutable `dict` and `set`, requiring `frozendict` and `frozenset` instead.

## Installation

```bash
pip install flake8-frozen-collections
```

## Usage

```bash
flake8 your_project/
```

## Error Codes

| Code  | Description                              |
|-------|------------------------------------------|
| FCS100 | Use `frozendict` instead of `dict`      |
| FCS200 | Use `frozenset` instead of `set`        |

## What Is Checked

- Literals `{...}` and `{key: value}`
- Calls to `dict(...)` and `set(...)`
- dict/set comprehensions
- Type annotations `dict[...]`, `set[...]`, `dict`, `set`
- Checks `isinstance(..., dict)` and `isinstance(..., set)`

## Example

```python
# Bad
mapping: dict[str, int] = {"a": 1}
tags: set[str] = {"x", "y"}

# Good
from frozendict import frozendict

mapping = frozendict({"a": 1})
tags = frozenset({"x", "y"})
```

