Skip to content

Commit

Permalink
Merge pull request #926 from onekey-sec/dependabot/pip/ruff-0.6.1
Browse files Browse the repository at this point in the history
build(deps-dev): bump ruff from 0.5.7 to 0.6.1
  • Loading branch information
nyuware authored Aug 21, 2024
2 parents 013b5a8 + ae8be57 commit 7311f1c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 27 deletions.
40 changes: 20 additions & 20 deletions poetry.lock

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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pytest = "^8.0.0"
pyright = "^1.1.349"
pre-commit = "^3.5.0"
pytest-cov = ">=3,<6"
ruff = "0.5.7"
ruff = "0.6.1"
pyyaml = "^6.0.1"
atheris = { version = "^2.3.0", python = "<3.12" }

Expand Down
3 changes: 1 addition & 2 deletions unblob/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,7 @@ def iterate_file(
file_read = file.read
while read_bytes < size:
remaining = size - read_bytes
if remaining < buffer_size:
buffer_size = remaining
buffer_size = min(remaining, buffer_size)
read_bytes += buffer_size
data = file_read(buffer_size)

Expand Down
6 changes: 2 additions & 4 deletions unblob/handlers/executable/elf.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ def get_last_section_end(
continue

section_end = section_header.sh_offset + section_header.sh_size
if section_end > last_section_end:
last_section_end = section_end
last_section_end = max(section_end, last_section_end)

return last_section_end

Expand All @@ -191,8 +190,7 @@ def get_last_program_end(
)

program_end = program_header.p_offset + program_header.p_filesz
if program_end > last_program_end:
last_program_end = program_end
last_program_end = max(program_end, last_program_end)

return last_program_end

Expand Down

0 comments on commit 7311f1c

Please sign in to comment.