File tree Expand file tree Collapse file tree 7 files changed +10
-12
lines changed Expand file tree Collapse file tree 7 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 2121 - uses : actions/checkout@v3
2222
2323 - name : Set up Python ${{ matrix.python-version }}
24- uses : actions/setup-python@v2
24+ uses : actions/setup-python@v4
2525 with :
2626 python-version : ${{ matrix.python-version }}
2727
Original file line number Diff line number Diff line change 1818 - uses : actions/checkout@v3
1919
2020 - name : Set up Python ${{ matrix.python-version }}
21- uses : actions/setup-python@v2
21+ uses : actions/setup-python@v4
2222 with :
2323 python-version : ${{ matrix.python-version }}
2424
Original file line number Diff line number Diff line change 1717 - uses : actions/checkout@v3
1818
1919 - name : Set up Python ${{ matrix.python-version }}
20- uses : actions/setup-python@v2
20+ uses : actions/setup-python@v4
2121 with :
2222 python-version : ${{ matrix.python-version }}
2323
3636 pip install -e .[dev]
3737
3838 - name : Cache pre-commit
39- uses : actions/cache@v2
39+ uses : actions/cache@v3
4040 with :
4141 path : ~/.cache/pre-commit
4242 key : ${{ runner.os }}-prec-${{ hashFiles('.pre-commit-config.yaml') }}
Original file line number Diff line number Diff line change 1818 - uses : actions/checkout@v3
1919
2020 - name : Set up Python ${{ matrix.python-version }}
21- uses : actions/setup-python@v2
21+ uses : actions/setup-python@v4
2222 with :
2323 python-version : ${{ matrix.python-version }}
2424
Original file line number Diff line number Diff line change 3434 ]
3535
3636 - repo : https://github.com/pre-commit/mirrors-mypy
37- rev : v1.0 .1
37+ rev : v1.4 .1
3838 hooks :
3939 - id : mypy
4040 args : []
Original file line number Diff line number Diff line change @@ -142,15 +142,13 @@ def is_pdf_empty(self) -> bool:
142142 self .file_object .seek (0 )
143143 with pikepdf .open (self .file_object ) as pdf :
144144 for page in pdf .pages :
145- # mypy incorrectly identifies the "/Length" key's value as
146- # an object rather than an int.
147145 try :
148146 total_size = page ["/Contents" ]["/Length" ]
149147 except ValueError :
150- total_size = 0 # type: ignore
151- for content in page ["/Contents" ]: # type: ignore
148+ total_size = 0
149+ for content in page ["/Contents" ]:
152150 total_size += content ["/Length" ]
153- has_data = total_size > 1000 # type: ignore
151+ has_data = total_size > 1000
154152
155153 has_font = "/Font" in page ["/Resources" ].keys ()
156154 has_xobj = "/XObject" in page ["/Resources" ].keys ()
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ mindee =
4646[options.extras_require]
4747dev =
4848 black ==23.1.0
49- mypy ==1.0 .1
49+ mypy ==1.4 .1
5050 pip-tools~=6.12.3
5151 pylint ==2.17.1
5252 setuptools ==51.3.3
You can’t perform that action at this time.
0 commit comments