class inspector package
Project description
Read the docs
Custom Validators
Extension of the validators from the attrs library, these allow the use of type checking the constituents of a collection.
Example attrs validator and the problem this is a solution to*:
possible: list = attr.ib(validator=[instance_of(list)])
not_possible: List[int] = attr.ib(validator=[instance_of(List[int])])
This means that we can't validate the members of a collection. However, with the custom validators we can do this:
now_possible: Collection = attr.ib(validator=[validate_generic_of_type(Collection, float)])
Meaning we can pass in any object that implements the following dunder methods [__contains__, __iter__, __len__]
AND validate that each member of the collection is a float. This is possible for other types too.
*on closer inspection (ironic given this repo's name) of the attrs API reference this is a solved problem with deep_iterable() and deep_mapping(). attrs: 2, me: 0
generated repo map
└── class_inspector
├── docs
│ └── source
│ └── conf.py
├── src
│ └── class_inspector
│ ├── __init__.py
│ ├── _logger.py
│ ├── create_tests.py
│ ├── cst_walkers.py
│ ├── custom_validators.py
│ ├── data_structures.py
│ ├── guard_conditions.py
│ ├── transform.py
│ └── utils.py
├── tests
│ ├── __init__.py
│ ├── conftest.py
│ ├── test_create_tests.py
│ ├── test_custom_validators.py
│ ├── test_guard_conditions.py
│ ├── test_transform.py
│ └── test_utils.py
├── README.md
├── pyproject.toml
└── setup.py
::
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file class_inspector-0.3.1.tar.gz.
File metadata
- Download URL: class_inspector-0.3.1.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
283a22ce0618d1d10bbd8dacd5d539f0187bc26e26469fb3c112c41c9125c6a8
|
|
| MD5 |
08215b8d7038d383f800450dcc51bacd
|
|
| BLAKE2b-256 |
7e420fe4be51becfcfd5da8e9bd1ff023a7a959a34a227caa733aad743453c74
|
Provenance
The following attestation bundles were made for class_inspector-0.3.1.tar.gz:
Publisher:
publish.yaml on second-ed/class_inspector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
class_inspector-0.3.1.tar.gz -
Subject digest:
283a22ce0618d1d10bbd8dacd5d539f0187bc26e26469fb3c112c41c9125c6a8 - Sigstore transparency entry: 165521514
- Sigstore integration time:
-
Permalink:
second-ed/class_inspector@4ade2ba850b0e4e8c701519dcc28ae069d642430 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/second-ed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@4ade2ba850b0e4e8c701519dcc28ae069d642430 -
Trigger Event:
release
-
Statement type:
File details
Details for the file class_inspector-0.3.1-py3-none-any.whl.
File metadata
- Download URL: class_inspector-0.3.1-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98f35a63b22711894c0db56c548ed4260630235f96d95fbafeb025b72b9dc4d4
|
|
| MD5 |
577a7aaab18f76d0055f0df9554b5d01
|
|
| BLAKE2b-256 |
bc3050dd19ca3920689cc8d550889b3abbad6abb0cc2f9ca53ed59dd71742b40
|
Provenance
The following attestation bundles were made for class_inspector-0.3.1-py3-none-any.whl:
Publisher:
publish.yaml on second-ed/class_inspector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
class_inspector-0.3.1-py3-none-any.whl -
Subject digest:
98f35a63b22711894c0db56c548ed4260630235f96d95fbafeb025b72b9dc4d4 - Sigstore transparency entry: 165521517
- Sigstore integration time:
-
Permalink:
second-ed/class_inspector@4ade2ba850b0e4e8c701519dcc28ae069d642430 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/second-ed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@4ade2ba850b0e4e8c701519dcc28ae069d642430 -
Trigger Event:
release
-
Statement type: