Skip to content

Commit cecdfad

Browse files
rwgkhenryiii
andauthored
minor cleanup: fixing or silencing flake8 errors (#2731)
* minor cleanup: fixing or silencing flake8 errors * ci: lock CMake to non-Universal version * Update .github/workflows/ci.yml Co-authored-by: Henry Schreiner <[email protected]>
1 parent 30eb39e commit cecdfad

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ jobs:
7272

7373
- name: Update CMake
7474
uses: jwlawson/[email protected]
75+
with:
76+
cmake-version: 3.19.1
7577

7678
- name: Cache wheels
7779
if: runner.os == 'macOS'
@@ -550,6 +552,8 @@ jobs:
550552

551553
- name: Update CMake
552554
uses: jwlawson/[email protected]
555+
with:
556+
cmake-version: 3.19.1
553557

554558
- name: Prepare MSVC
555559
uses: ilammy/msvc-dev-cmd@v1
@@ -596,6 +600,8 @@ jobs:
596600

597601
- name: Update CMake
598602
uses: jwlawson/[email protected]
603+
with:
604+
cmake-version: 3.19.1
599605

600606
- name: Prepare MSVC
601607
uses: ilammy/msvc-dev-cmd@v1
@@ -650,6 +656,8 @@ jobs:
650656

651657
- name: Update CMake
652658
uses: jwlawson/[email protected]
659+
with:
660+
cmake-version: 3.19.1
653661

654662
- name: Prepare env
655663
run: python -m pip install -r tests/requirements.txt --prefer-binary

tests/test_enum.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,25 @@ def test_unscoped_enum():
7373
assert not (y == "2")
7474

7575
with pytest.raises(TypeError):
76-
y < object()
76+
y < object() # noqa: B015
7777

7878
with pytest.raises(TypeError):
79-
y <= object()
79+
y <= object() # noqa: B015
8080

8181
with pytest.raises(TypeError):
82-
y > object()
82+
y > object() # noqa: B015
8383

8484
with pytest.raises(TypeError):
85-
y >= object()
85+
y >= object() # noqa: B015
8686

8787
with pytest.raises(TypeError):
88-
y | object()
88+
y | object() # noqa: B015
8989

9090
with pytest.raises(TypeError):
91-
y & object()
91+
y & object() # noqa: B015
9292

9393
with pytest.raises(TypeError):
94-
y ^ object()
94+
y ^ object() # noqa: B015
9595

9696
assert int(m.UnscopedEnum.ETwo) == 2
9797
assert str(m.UnscopedEnum(2)) == "UnscopedEnum.ETwo"
@@ -134,13 +134,13 @@ def test_scoped_enum():
134134
assert not (z == object())
135135
# Scoped enums will *NOT* accept >, <, >= and <= int comparisons (Will throw exceptions)
136136
with pytest.raises(TypeError):
137-
z > 3
137+
z > 3 # noqa: B015
138138
with pytest.raises(TypeError):
139-
z < 3
139+
z < 3 # noqa: B015
140140
with pytest.raises(TypeError):
141-
z >= 3
141+
z >= 3 # noqa: B015
142142
with pytest.raises(TypeError):
143-
z <= 3
143+
z <= 3 # noqa: B015
144144

145145
# order
146146
assert m.ScopedEnum.Two < m.ScopedEnum.Three

tests/test_local_bindings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def test_stl_caster_vs_stl_bind(msg):
193193
v2 = [1, 2, 3]
194194
assert m.load_vector_via_caster(v2) == 6
195195
with pytest.raises(TypeError) as excinfo:
196-
cm.load_vector_via_binding(v2) == 6
196+
cm.load_vector_via_binding(v2)
197197
assert (
198198
msg(excinfo.value)
199199
== """

0 commit comments

Comments
 (0)