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 <HenrySchreinerIII@gmail.com>
This commit is contained in:
Ralf W. Grosse-Kunstleve
2020-12-18 19:41:43 -05:00
committed by GitHub
parent 30eb39ed79
commit cecdfadc58
3 changed files with 20 additions and 12 deletions

View File

@@ -73,25 +73,25 @@ Members:
assert not (y == "2")
with pytest.raises(TypeError):
y < object()
y < object() # noqa: B015
with pytest.raises(TypeError):
y <= object()
y <= object() # noqa: B015
with pytest.raises(TypeError):
y > object()
y > object() # noqa: B015
with pytest.raises(TypeError):
y >= object()
y >= object() # noqa: B015
with pytest.raises(TypeError):
y | object()
y | object() # noqa: B015
with pytest.raises(TypeError):
y & object()
y & object() # noqa: B015
with pytest.raises(TypeError):
y ^ object()
y ^ object() # noqa: B015
assert int(m.UnscopedEnum.ETwo) == 2
assert str(m.UnscopedEnum(2)) == "UnscopedEnum.ETwo"
@@ -134,13 +134,13 @@ def test_scoped_enum():
assert not (z == object())
# Scoped enums will *NOT* accept >, <, >= and <= int comparisons (Will throw exceptions)
with pytest.raises(TypeError):
z > 3
z > 3 # noqa: B015
with pytest.raises(TypeError):
z < 3
z < 3 # noqa: B015
with pytest.raises(TypeError):
z >= 3
z >= 3 # noqa: B015
with pytest.raises(TypeError):
z <= 3
z <= 3 # noqa: B015
# order
assert m.ScopedEnum.Two < m.ScopedEnum.Three