-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix-608-decryption-fails-when-no-ID-in-tra…
…iler
- Loading branch information
Showing
78 changed files
with
2,246 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[run] | ||
source = PyPDF2 | ||
branch = True | ||
|
||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
@overload | ||
|
||
# Don't complain about missing debug-only code: | ||
def __repr__ | ||
def __str__ | ||
if self\.debug | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if __name__ == .__main__.: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Unit Tests | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Upgrade pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Install requirements (python 3) | ||
if: matrix.python-version != '2.7' | ||
run: | | ||
pip install -r requirements/ci.txt | ||
- name: Install requirements (python 2) | ||
if: matrix.python-version == '2.7' | ||
run: | | ||
pip install pillow pytest pytest-cov | ||
- name: Install module | ||
run: | | ||
pip install . | ||
- name: Test with flake8 | ||
run: | | ||
flake8 . --ignore E,F,I,SIM,C,PT,N,ASS,A,P,R,W | ||
if: matrix.python-version != '2.7' | ||
|
||
- name: Test with pytest | ||
run: | | ||
pytest Tests/tests.py Tests --cov --cov-report term-missing -vv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# pre-commit run --all-files | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
- id: check-added-large-files | ||
args: ['--maxkb=1000'] | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
args: ["--ignore", "E,W,F"] | ||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: v0.942 | ||
# hooks: | ||
# - id: mypy | ||
# - repo: https://github.com/psf/black | ||
# rev: 22.3.0 | ||
# hooks: | ||
# - id: black | ||
# - repo: https://github.com/asottile/pyupgrade | ||
# rev: v2.31.1 | ||
# hooks: | ||
# - id: pyupgrade | ||
# args: [--py36-plus] | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.12.1 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==22.1.0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.6.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
language: python | ||
python: "2.7" | ||
sudo: false | ||
|
||
env: | ||
- TOX_ENV=py27 | ||
- TOX_ENV=py33 | ||
- TOX_ENV=py34 | ||
- TOX_ENV=py35 | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
- "pypy" | ||
- "pypy3" | ||
|
||
install: | ||
- pip install tox --use-mirrors | ||
- pip install tox-travis | ||
|
||
script: | ||
- tox -e $TOX_ENV | ||
- tox | ||
|
||
matrix: | ||
# Python 3.5 not yet available on travis, watch this to see when it is. | ||
fast_finish: true | ||
allow_failures: | ||
- env: TOX_ENV=py35 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
include CHANGELOG | ||
include LICENSE | ||
include Scripts/pdfcat | ||
recursive-include Resources * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
maint: | ||
pre-commit autoupdate | ||
pip-compile -U requirements/ci.in | ||
pip-compile -U requirements/dev.in | ||
pip-compile -U requirements/docs.in | ||
|
||
upload: | ||
make clean | ||
python setup.py sdist bdist_wheel && twine upload -s dist/* | ||
|
||
clean: | ||
python setup.py clean --all | ||
pyclean . | ||
rm -rf Tests/__pycache__ PyPDF2/__pycache__ Image9.png htmlcov docs/_build dist dont_commit_merged.pdf dont_commit_writer.pdf PyPDF2.egg-info PyPDF2_pdfLocation.txt | ||
|
||
test: | ||
pytest Tests/tests.py Tests --cov --cov-report term-missing -vv --cov-report html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,8 @@ we won't add PDFs without expressed permission. | |
(This folder is available through GitHub only) | ||
|
||
|
||
Feel free to add any type of PDF file or sample code, | ||
Feel free to add any type of PDF file or sample code, | ||
either by | ||
|
||
1) sending it via email to [email protected] | ||
2) including it in a pull request on GitHub | ||
2) including it in a pull request on GitHub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '1.26.0' | ||
__version__ = '1.27.2' |
Oops, something went wrong.