Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ruff from 0.1.15 to 0.5.5 #4

Merged
merged 3 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions adventofcode/d12.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ def _classify_completion(self) -> bool | None:
return False

if known_damaged_lengths == self._data.group_lengths:
if self._first_unknown_index_resolved and any(
symbol == "#"
if not self._first_unknown_index_resolved:
return True
return all(
symbol != "#"
for symbol in self._data.records[self._first_unknown_index :]
):
return False
return True
)

if self._first_unknown_index is None:
# No unknowns found -> records processed exhaustively
Expand Down
7 changes: 3 additions & 4 deletions adventofcode/d3.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,10 @@ def is_adjacent(number: Number, gear_symbol: GearSymbol) -> bool:
number.adjacent_row_range_begin, number.adjacent_row_range_end
):
return False
if gear_symbol.ind not in range(

return gear_symbol.ind in range(
number.adjacent_ind_range_begin, number.adjacent_ind_range_end
):
return False
return True
)

result = 0
for gear_symbol in gear_symbols:
Expand Down
39 changes: 20 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ typer = "^0.9.0"
[tool.poetry.group.dev.dependencies]
mypy = "^1.7.1"
pytest = "^7.4.3"
ruff = "^0.1.7"
ruff = "^0.5.5"
poethepoet = "^0.27.0"
snakeviz = "^2.2.0"
tuna = "^0.5.11"
Expand All @@ -40,7 +40,7 @@ adventofcode = "adventofcode.main:app"
python_version = "3.12"
strict_optional = true

[tool.ruff]
[tool.ruff.lint]
select = [
"A", # prevent using keywords that clobber python builtins
"B", # bugbear: security warnings
Expand Down