Skip to content

Commit

Permalink
Merge pull request #194 from cfcurtis/bug_fixes
Browse files Browse the repository at this point in the history
Fixing crash on old Python version used for Windows build
  • Loading branch information
cfcurtis authored Jul 27, 2023
2 parents 8d59042 + 059c3c7 commit 0fe8ec9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pdfstitcher/tile_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def calc_rows_cols(self, n_tiles: int) -> bool:
else:
return self.cols * self.rows - n_tiles < self.cols

def grid_position(self, tile_i: int) -> tuple[int, int]:
def grid_position(self, tile_i: int) -> tuple:
"""Determines the placement of the tile in the grid, returning a tuple of (row, col)"""
if self.col_major:
c = math.floor(tile_i / self.rows)
Expand All @@ -368,7 +368,7 @@ def grid_position(self, tile_i: int) -> tuple[int, int]:

return r, c

def calc_shift(self, horizontal_space: float, vertical_space: float) -> tuple[float, float]:
def calc_shift(self, horizontal_space: float, vertical_space: float) -> tuple:
"""
Calculates the shift needed to align the tile in the grid.
Returns a tuple of (shift_right, shift_up).
Expand Down
2 changes: 1 addition & 1 deletion pdfstitcher/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def init_new_doc(pdf):

def get_page_dims(
page, global_rotation: float = 0, target_user_unit: float = 1
) -> tuple[float, float]:
) -> tuple:
"""
Helper function to calculate the page dimensions
Returns width, height in pixels as observed by the user
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pdfstitcher"
version = "0.9"
version = "0.9.1"
description = "The open source PDF stitching software for sewists, by sewists."
readme = "README.md"
requires-python = ">=3.8, <3.11"
Expand Down

0 comments on commit 0fe8ec9

Please sign in to comment.