evhub / evhub/coconut

Support for enforce library

Open
#364 2 comments 1 reaction 0 assignees View on GitHub
oversight
Dominant language
Python
Stars
4.4k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

Any plans to allow [runtime type enforcing](https://github.com/RussBaz/enforce)?
I attempted to use the enforce decorator `@runtime_validation` but for the `data` types (coconut named tuples, while enforce expects [`typing.NamedTuple`](https://github.com/RussBaz/enforce#namedtuple)) I couldn't get it working.

```
Argument 'pinfo' was not of type . Actual type was untyped PathInfo
```

Do you have any opinion on supporting that or idea how to cope with it?

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by examining Coconut's generated data types and named-tuple handling alongside enforce's runtime_validation and typing.NamedTuple requirements. Done would mean a decided approach and documented or implemented support for validating Coconut named tuples.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.