Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/python-attrs/attrs
/ C
Class
C
tests/test_converters.py:263–265 · tests/test_converters.py::TestPipe.C
Source
from the content-addressed store, hash-verified
261
262
@attr.s
263
class
C:
264
a1 = attrib(default=
class
="st">"True", converter=pipe(str, to_bool, bool))
265
a2 = attrib(default=True, converter=[str, to_bool, bool])
266
267
c = C()
268
assert True is c.a1 is c.a2
Callers
4
test_falsey_converter
Method · 0.70
test_sugar
Method · 0.70
test_wrapped_annotation
Method · 0.70
test_instance
Method · 0.70
Calls
3
attrib
Function · 0.90
Converter
Class · 0.90
pipe
Function · 0.50
Tested by
4
test_falsey_converter
Method · 0.56
test_sugar
Method · 0.56
test_wrapped_annotation
Method · 0.56
test_instance
Method · 0.56