Skip to content

Commit ae2663e

Browse files
lint + format
1 parent ea43b3d commit ae2663e

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/order.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,8 @@ Reinitialize a {0} object from a {1} list.
14091409
)pbdoc",
14101410
name);
14111411
py::class_<Cmp> thing(m,
1412-
binding_name,
1413-
fmt::format(R"pbdoc(
1412+
binding_name,
1413+
fmt::format(R"pbdoc(
14141414
Compare words using {2}.
14151415
14161416
Use ``{0}({1})`` to compare either ``str`` or ``list[int]`` words. In this
@@ -1438,11 +1438,11 @@ type as *alphabet*.
14381438
True
14391439
{3}
14401440
)pbdoc",
1441-
name,
1442-
configuration,
1443-
ordering,
1444-
non_alphabet_string_doctest)
1445-
.c_str());
1441+
name,
1442+
configuration,
1443+
ordering,
1444+
non_alphabet_string_doctest)
1445+
.c_str());
14461446

14471447
thing.def(py::init<Alphabet<Word> const&, std::vector<size_t> const&>(),
14481448
py::arg("alphabet"),
@@ -2836,7 +2836,7 @@ Return the alphabet used to compare letters.
28362836
)pbdoc",
28372837
py::return_value_policy::reference_internal);
28382838
} // bind_rev_lenlex_cmp_with_alphabet
2839-
} // namespace
2839+
} // namespace
28402840

28412841
void init_order(py::module& m) {
28422842
py::options options;

tests/test_order.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# The full license is in the file LICENSE, distributed with this software.
66

7+
# pylint: disable=too-many-lines, invalid-name
8+
79
"""Tests for order.cpp."""
810

911
from copy import copy
@@ -60,7 +62,7 @@ def _check_simple_copy_and_repr(Cmp, name):
6062
original.__copy__(), # pylint: disable=unnecessary-dunder-call
6163
copy(original),
6264
)
63-
assert all(type(copied) is Cmp for copied in copies)
65+
assert all(isinstance(copied, Cmp) for copied in copies)
6466
assert all(copied is not original for copied in copies)
6567
assert all(copied.py_template_params == original.py_template_params for copied in copies)
6668
assert all(copied(x, y) for copied in copies)
@@ -90,7 +92,7 @@ def _check_configured_copy_and_repr(Cmp, name, configuration_name, accessor_name
9092
copy(original),
9193
)
9294
original.init(*replacement_args)
93-
assert all(type(copied) is Cmp for copied in copies)
95+
assert all(isinstance(copied, Cmp) for copied in copies)
9496
assert all(copied is not original for copied in copies)
9597
assert all(getattr(copied, accessor_name)() == [1, 2] for copied in copies)
9698
if alphabet is not None:

0 commit comments

Comments
 (0)