Skip to content

Commit

Permalink
Fix ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasberbuer committed Mar 23, 2023
1 parent dfba4bf commit 23b85ad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.247
rev: v0.0.258
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion src/conan_check_updates/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def highlighted_version_difference(version: VersionLike, compare: VersionLike) -
version = str(version)
compare = str(compare)
i_first_diff = next(
(i for i, (s1, s2) in enumerate(zip(version, compare)) if s1 != s2), # noqa: B905
(i for i, (s1, s2) in enumerate(zip(version, compare)) if s1 != s2),
None,
)
if i_first_diff is None:
Expand Down
4 changes: 2 additions & 2 deletions src/conan_check_updates/conan.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def inspect_requires_conanfile_txt(conanfile: Path) -> List[ConanReference]:
attributes = defaultdict(list)
with open(conanfile, mode="r", encoding="utf-8") as file:
key = None
for line in file:
line = line.strip()
for line_orig in file:
line = line_orig.strip()
# strip end of line comment
line = line.partition(" #")[0].strip()
# ignore empty line or line comments
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def test_parse_args_version(capsys):
assert e.value.code == 0

stdout, stderr = capsys.readouterr()
assert stdout != ""
assert stderr == ""
assert stdout
assert not stderr

version_parts = stdout.split(".")
assert len(version_parts) == 3
Expand Down

0 comments on commit 23b85ad

Please sign in to comment.