flake8-frozen-collections
A Flake8 plugin that prohibits the use of mutable dict and set, requiring frozendict and frozenset instead.
Installation
pip install flake8-frozen-collections
Usage
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(...)andset(...) - dict/set comprehensions
- Type annotations
dict[...],set[...],dict,set - Checks
isinstance(..., dict)andisinstance(..., set)
Example
# 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"})
Release files for flake8-frozen-collections 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake8_frozen_collections-0.0.1.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_frozen_collections-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / flake8_frozen_collections-0.0.1.tar.gz
| Download URL | flake8_frozen_collections-0.0.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2689b7fbcaba1ec0f6c4bbd637f508aec1748eb8a24c8597271315575063c80b
|
|
BLAKE2b-256 checksum How to use checksums |
8c9c974face5b03445058db6b986c755168263eefbcb25c6352718418976d456
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.6 Darwin/24.3.0
|
Release files / flake8_frozen_collections-0.0.1-py3-none-any.whl
| Download URL | flake8_frozen_collections-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac152d85b3dac6699e3db12e83f0484f20b9ed5d87ea7720bc5159d1e60f00f4
|
|
BLAKE2b-256 checksum How to use checksums |
c08aa6e4c986a32a1ecc14358121a8682293889dc1d2995d9d7a82f4081507b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.6 Darwin/24.3.0
|