Code
Hub
Workspaces
Connect your AI tool
Indexed graphs
Engine
MCP
copy
hub
/
github.com/python-attrs/attrs
/ C
Class
C
tests/test_validators.py:316–318 · tests/test_validators.py::TestAnd.C
Source
from the content-addressed store, hash-verified
314
315
@attr.s
316
class
C:
317
a1 = attr.ib(
class
="st">"a1", validator=and_(instance_of(int)))
318
a2 = attr.ib(
class
="st">"a2", validator=[instance_of(int)])
319
320
assert C.__attrs_attrs__[0].validator == C.__attrs_attrs__[1].validator
321
Callers
1
test_is_hashable
Method · 0.70
Calls
2
instance_of
Function · 0.90
and_
Function · 0.85
Tested by
1
test_is_hashable
Method · 0.56