Skip to content

Commit

Permalink
CHANGES
Browse files Browse the repository at this point in the history
=======

utils.py

- Fix import-error from pdfminer
- Add type-annotations
- Code optimisations random_string(), remove_extra(), text_strip(),
    compute_whitespace()
- Improve code-readability.
- Add more unit-test cases.
  • Loading branch information
python3-dev committed Jan 1, 2025
1 parent a0210fd commit 9d1a5e3
Show file tree
Hide file tree
Showing 6 changed files with 2,309 additions and 271 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ dmypy.json

# OSX Files
.DS_Store

.venv
4 changes: 2 additions & 2 deletions camelot/parsers/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ def scale_areas(areas):
)

for bbox, parse in self.table_bbox_parses.items():
joints = parse["joints"]
joints: list[tuple[float, float]] = parse["joints"]

# Merge x coordinates that are close together
line_tol = self.line_tol
line_tol: int = self.line_tol
# Sort the joints, make them a list of lists (instead of sets)
joints_normalized = list(
map(lambda x: list(x), sorted(joints, key=lambda j: -j[0]))
Expand Down
Loading

0 comments on commit 9d1a5e3

Please sign in to comment.