Skip to content

Commit

Permalink
Quickfix for Python 3.8 type hint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvine committed Aug 18, 2024
1 parent e2a707b commit 1d0eeff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [0.11.4] - [unreleased]

### Fixed

- Fix one type hint so that it doesn't throw error on Python 3.8 (h/t @andrekeller). ([#1184](https://github.com/jsvine/pdfplumber/issues/1184))

## [0.11.3] - 2024-08-07

### Added
Expand Down
4 changes: 2 additions & 2 deletions pdfplumber/table.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import itertools
from dataclasses import dataclass
from operator import itemgetter
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, Union
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, Type, Union

from . import utils
from ._typing import T_bbox, T_num, T_obj, T_obj_iter, T_obj_list, T_point
Expand Down Expand Up @@ -389,7 +389,7 @@ def bbox(self) -> T_bbox:
max(map(itemgetter(3), c)),
)

def _get_rows_or_cols(self, kind: type[CellGroup]) -> List[CellGroup]:
def _get_rows_or_cols(self, kind: Type[CellGroup]) -> List[CellGroup]:
axis = 0 if kind is Row else 1
antiaxis = int(not axis)

Expand Down

0 comments on commit 1d0eeff

Please sign in to comment.