Skip to content

Commit d4261ef

Browse files
congruence_kind: format the doc like other enums
1 parent ecb386f commit d4261ef

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

src/types.cpp

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@
2828
namespace libsemigroups {
2929

3030
void init_types(py::module& m) {
31-
{
32-
py::options options;
33-
options.disable_enum_members_docstring();
34-
py::enum_<tril>(m, "tril", R"pbdoc(
31+
py::options options;
32+
options.disable_enum_members_docstring();
33+
py::enum_<tril>(m, "tril", R"pbdoc(
3534
The values in this enum can be used to indicate a result is true, false, or not
3635
currently known.
3736
@@ -52,21 +51,27 @@ The valid values are:
5251
5352
Value representing unknown (either true or false).
5453
)pbdoc")
55-
.value("true", tril::TRUE)
56-
.value("false", tril::FALSE)
57-
.value("unknown", tril::unknown);
58-
}
54+
.value("true", tril::TRUE)
55+
.value("false", tril::FALSE)
56+
.value("unknown", tril::unknown);
5957

6058
py::enum_<congruence_kind>(m, "congruence_kind", R"pbdoc(
61-
The values in this class can be used to indicate that a congruence should
62-
be 1-sided or 2-sided.
59+
The values in this class can be used to indicate that a congruence should
60+
be 1-sided or 2-sided.
61+
62+
.. py:attribute:: congruence_kind.onesided
63+
:value: <congruence_kind.onesided: 0>
64+
65+
Value representing 1-sided (right) congruences.
66+
67+
.. py:attribute:: congruence_kind.twosided
68+
:value: <congruence_kind.twosided: 1>
69+
70+
Value representing 2-sided congruences.
71+
6372
)pbdoc")
64-
.value("onesided",
65-
congruence_kind::onesided,
66-
R"pbdoc(Type for 1-sided congruences (right).)pbdoc")
67-
.value("twosided",
68-
congruence_kind::twosided,
69-
R"pbdoc(Type for 2-sided congruences.)pbdoc");
73+
.value("onesided", congruence_kind::onesided)
74+
.value("twosided", congruence_kind::twosided);
7075
}
7176

7277
} // namespace libsemigroups

0 commit comments

Comments
 (0)