Skip to content

Commit

Permalink
fix: remove as _ from except statements
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-sentry committed Nov 25, 2024
1 parent 173d0ce commit 3aa3140
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion codecov_cli/services/upload/upload_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _get_file_fixes(
reason=err.reason,
),
)
except IsADirectoryError as _:
except IsADirectoryError:
logger.info(f"Skipping {filename}, found a directory not a file")

return UploadCollectionResultFileFixer(
Expand Down
2 changes: 1 addition & 1 deletion tests/ci_adapters/test_circleci.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_branch(self, env_dict, expected, mocker):
assert actual == expected

def test_raises_value_error_if_invalid_field(self):
with pytest.raises(ValueError) as _:
with pytest.raises(ValueError):
CircleCICIAdapter().get_fallback_value("some random key x 123")

def test_service(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/ci_adapters/test_herokuci.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_branch(self, env_dict, expected, mocker):
assert actual == expected

def test_raises_value_error_if_invalid_field(self):
with pytest.raises(ValueError) as _:
with pytest.raises(ValueError):
HerokuCIAdapter().get_fallback_value("some_random_key")

def test_service(self):
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/test_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
)
def test_encode_invalid_slug(slug):
with pytest.raises(ValueError) as _:
with pytest.raises(ValueError):
encode_slug(slug)


Expand Down Expand Up @@ -77,7 +77,7 @@ def test_valid_slug():
)
def test_invalid_encoded_slug(slug):
assert slug_encoded_incorrectly(slug)
with pytest.raises(ValueError) as _:
with pytest.raises(ValueError):
decode_slug(slug)


Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/test_versioning_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ def test_list_relevant_files_fails_if_no_root_is_found(self, mocker):
)

vs = GitVersioningSystem()
with pytest.raises(ValueError) as _:
with pytest.raises(ValueError):
vs.list_relevant_files()

0 comments on commit 3aa3140

Please sign in to comment.