Apply suggestions from code review of branch Increased-linting
Co-authored-by: Beth Probert <beth_probert@outlook.com>
This commit is contained in:
parent
b4e28e232e
commit
b9ca8b3094
5 changed files with 5 additions and 4 deletions
|
|
@ -55,7 +55,7 @@ def test_handle_broken_frame():
|
|||
|
||||
# Check that this does cause broken frames.
|
||||
# The noqa is because we don't know exactly when the error is thrown so we
|
||||
# can't have a single simple statements in the pytest raises.
|
||||
# can't have a single simple statement in the pytest raises.
|
||||
with pytest.raises( # noqa PT012
|
||||
OSError, match="broken data stream when reading image file"
|
||||
):
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ def thing_server():
|
|||
server.add_thing(CameraStageMapper(), "/camera_stage_mapping/")
|
||||
assert os.path.exists(os.path.join(temp_folder.name, "camera/"))
|
||||
# Note: yield is important. If return is used the temp folder gets deleted
|
||||
# before the test runs
|
||||
# before the test runs. Silence PT022 as ruff doesn't think yield is needed.
|
||||
yield server # noqa: PT022
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ def git_repo(temp_dir):
|
|||
_git("add -A")
|
||||
_git("commit -m 'message2'")
|
||||
|
||||
# Yielding here as temdir is yielding and we want to stay in the tempdir
|
||||
# Yielding here as tempdir is yielding and we want to stay in the tempdir
|
||||
# context manager. Silencing ruff saying it should be return.
|
||||
yield temp_dir # noqa: PT022
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue