MCPcopy
hub / github.com/python-attrs/attrs / simple_class

Function simple_class

tests/utils.py:11–36  ·  tests/utils.py::simple_class

Return a new simple class.

(
    eq=False,
    order=False,
    repr=False,
    unsafe_hash=False,
    str=False,
    slots=False,
    frozen=False,
    cache_hash=False,
)

Source from the content-addressed store, hash-verified

9
10
11def simple_class(
12 eq=False,
13 order=False,
14 repr=False,
15 unsafe_hash=False,
16 str=False,
17 slots=False,
18 frozen=False,
19 cache_hash=False,
20):
21 class="st">"""
22 Return a new simple class.
23 class="st">"""
24 return make_class(
25 class="st">"C",
26 [class="st">"a", class="st">"b"],
27 eq=eq or order,
28 order=order,
29 repr=repr,
30 unsafe_hash=unsafe_hash,
31 init=True,
32 slots=slots,
33 str=str,
34 frozen=frozen,
35 cache_hash=cache_hash,
36 )
37
38
39def simple_attr(

Callers 4

test_returns_classMethod · 0.85
test_dunders.pyFile · 0.85
test_str_no_reprMethod · 0.85

Calls 1

make_classFunction · 0.90

Tested by 3

test_returns_classMethod · 0.68
test_str_no_reprMethod · 0.68