mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
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:
parent
30eb39ed79
commit
cecdfadc58
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -72,6 +72,8 @@ jobs:
|
||||
|
||||
- name: Update CMake
|
||||
uses: jwlawson/actions-setup-cmake@v1.4
|
||||
with:
|
||||
cmake-version: 3.19.1
|
||||
|
||||
- name: Cache wheels
|
||||
if: runner.os == 'macOS'
|
||||
@ -550,6 +552,8 @@ jobs:
|
||||
|
||||
- name: Update CMake
|
||||
uses: jwlawson/actions-setup-cmake@v1.4
|
||||
with:
|
||||
cmake-version: 3.19.1
|
||||
|
||||
- name: Prepare MSVC
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
@ -596,6 +600,8 @@ jobs:
|
||||
|
||||
- name: Update CMake
|
||||
uses: jwlawson/actions-setup-cmake@v1.4
|
||||
with:
|
||||
cmake-version: 3.19.1
|
||||
|
||||
- name: Prepare MSVC
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
@ -650,6 +656,8 @@ jobs:
|
||||
|
||||
- name: Update CMake
|
||||
uses: jwlawson/actions-setup-cmake@v1.4
|
||||
with:
|
||||
cmake-version: 3.19.1
|
||||
|
||||
- name: Prepare env
|
||||
run: python -m pip install -r tests/requirements.txt --prefer-binary
|
||||
|
@ -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
|
||||
|
@ -193,7 +193,7 @@ def test_stl_caster_vs_stl_bind(msg):
|
||||
v2 = [1, 2, 3]
|
||||
assert m.load_vector_via_caster(v2) == 6
|
||||
with pytest.raises(TypeError) as excinfo:
|
||||
cm.load_vector_via_binding(v2) == 6
|
||||
cm.load_vector_via_binding(v2)
|
||||
assert (
|
||||
msg(excinfo.value)
|
||||
== """
|
||||
|
Loading…
Reference in New Issue
Block a user