Skip to content

Commit

Permalink
Merge branch 'py-pdf:main' into tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored Jan 31, 2025
2 parents bbb4ef1 + c914a62 commit 279a2d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pypdf/generic/_data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,9 @@ def get_next_obj_pos(
for gen in rem_gens:
loc = pdf.xref[gen]
try:
out = min(out, min([x for x in loc.values() if p < x <= p1]))
values = [x for x in loc.values() if p < x <= p1]
if values:
out = min(out, *values)
except ValueError:
pass
return out
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ ignore = [
"PLW0603", # Using the global statement to update `CUSTOM_RTL_SPECIAL_CHARS` is discouraged
"PLW1510", # `subprocess.run` without explicit `check` argument
"PLW2901", # `with` statement variable `img` overwritten by assignment target
"PLW3301", # Nested `min` calls can be flattened
"PT011", # `pytest.raises(ValueError)` is too broad, set the `match`
"PT012", # `pytest.raises()` block should contain a single simple statement
"PT014", # Ruff bug: Duplicate of test case at index 1 in `@pytest_mark.parametrize`
Expand Down Expand Up @@ -213,7 +212,7 @@ max-complexity = 54 # Recommended: 10
"docs/conf.py" = ["INP001", "PTH100"]
"json_consistency.py" = ["T201"]
"make_release.py" = ["S603", "S607", "T201"]
"pypdf/*" = ["N802", "N803"] # We first need to deprecate old stuff:
"pypdf/*" = ["N802", "N803"] # We first need to deprecate old stuff
"sample-files/*" = ["D100", "INP001"]
"tests/*" = ["ANN001", "ANN201", "B017", "B018", "D103", "D104", "S105", "S106"]
"tests/test_workflows.py" = ["T201"]
Expand Down

0 comments on commit 279a2d6

Please sign in to comment.