diff --git a/.github/workflows/title-check.yml b/.github/workflows/title-check.yml index 9a4e96b88..d005b0f46 100644 --- a/.github/workflows/title-check.yml +++ b/.github/workflows/title-check.yml @@ -1,20 +1,20 @@ -name: 'PR Title Check' -on: - pull_request: - # check when PR - # * is created, - # * title is edited, and - # * new commits are added (to ensure failing title blocks merging) - types: [opened, reopened, edited, synchronize] - -jobs: - title-check: - name: Title check - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - name: Check PR title - env: - PR_TITLE: ${{ github.event.pull_request.title }} - run: python .github/scripts/check_pr_title.py +name: 'PR Title Check' +on: + pull_request: + # check when PR + # * is created, + # * title is edited, and + # * new commits are added (to ensure failing title blocks merging) + types: [opened, reopened, edited, synchronize] + +jobs: + title-check: + name: Title check + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + - name: Check PR title + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: python .github/scripts/check_pr_title.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e75c1279..868c5f462 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ # pre-commit run --all-files repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v5.0.0 hooks: - id: check-ast - id: check-byte-order-marker @@ -18,40 +18,21 @@ repos: - id: check-added-large-files args: ['--maxkb=1000'] -- repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black - args: [--target-version, py37] - -- repo: https://github.com/asottile/blacken-docs - rev: 1.14.0 - hooks: - - id: blacken-docs - additional_dependencies: [black==22.1.0] - exclude: "docs/user/robustness.md" - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.1.9 + rev: v0.7.0 hooks: - id: ruff args: ['--fix'] - repo: https://github.com/asottile/pyupgrade - rev: v3.3.2 + rev: v3.19.0 hooks: - id: pyupgrade - args: [--py37-plus] - -- repo: https://github.com/pycqa/flake8 - rev: 5.0.4 - hooks: - - id: flake8 - args: ["--ignore", "E,W,F"] + args: [--py38-plus] - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.4.0' + rev: 'v1.13.0' hooks: - id: mypy - additional_dependencies: [types-Pillow==10.0.0.2] + additional_dependencies: [types-Pillow==10.2.0.20240822] files: ^pypdf/.* diff --git a/docs/user/streaming-data.md b/docs/user/streaming-data.md index b09ab4382..db00cc424 100644 --- a/docs/user/streaming-data.md +++ b/docs/user/streaming-data.md @@ -80,11 +80,10 @@ from io import BytesIO from google.cloud import storage -# os.environ["GOOGLE_APPLICATION_CREDENTIALS"] must be set +# os.environ["GOOGLE_APPLICATION_CREDENTIALS"] must be set storage_client = storage.Client() blob = storage_client.bucket("my-bucket").blob("mydoc.pdf") file_stream = BytesIO() blob.download_to_file(file_stream) reader = PdfReader(file_stream) ``` - diff --git a/requirements/dev.in b/requirements/dev.in index 6229bd533..6b5480305 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -1,7 +1,6 @@ -black pillow pip-tools -pre-commit<2.18.0 +pre-commit pytest-cov flit wheel diff --git a/requirements/dev.txt b/requirements/dev.txt index 40be42541..47d4589a0 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,98 +4,83 @@ # # pip-compile requirements/dev.in # -black==24.3.0 - # via -r dev.in -build==1.0.3 +build==1.2.2.post1 # via pip-tools -certifi==2023.11.17 +certifi==2024.8.30 # via requests -cfgv==3.3.1 +cfgv==3.4.0 # via pre-commit -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via requests click==8.1.7 - # via - # black - # pip-tools -coverage[toml]==7.2.7 + # via pip-tools +coverage[toml]==7.6.1 # via pytest-cov -distlib==0.3.8 +distlib==0.3.9 # via virtualenv docutils==0.20.1 # via flit -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 # via pytest -filelock==3.12.2 +filelock==3.16.1 # via virtualenv flit==3.9.0 - # via -r dev.in + # via -r requirements/dev.in flit-core==3.9.0 # via flit -identify==2.5.24 +identify==2.6.1 # via pre-commit -idna==3.6 +idna==3.10 # via requests -importlib-metadata==6.7.0 +importlib-metadata==8.5.0 # via build iniconfig==2.0.0 # via pytest -mypy-extensions==1.0.0 - # via black -nodeenv==1.8.0 +nodeenv==1.9.1 # via pre-commit -packaging==23.2 +packaging==24.1 # via - # black # build # pytest -pathspec==0.11.2 - # via black -pillow==9.5.0 - # via -r dev.in -pip-tools==6.14.0 - # via -r dev.in -platformdirs==4.0.0 - # via - # black - # virtualenv -pluggy==1.2.0 +pillow==10.4.0 + # via -r requirements/dev.in +pip-tools==7.4.1 + # via -r requirements/dev.in +platformdirs==4.3.6 + # via virtualenv +pluggy==1.5.0 # via pytest -pre-commit==2.17.0 - # via -r dev.in -pyproject-hooks==1.0.0 - # via build -pytest==7.4.3 +pre-commit==3.5.0 + # via -r requirements/dev.in +pyproject-hooks==1.2.0 + # via + # build + # pip-tools +pytest==8.3.3 # via pytest-cov -pytest-cov==4.1.0 - # via -r dev.in -pyyaml==6.0.1 +pytest-cov==5.0.0 + # via -r requirements/dev.in +pyyaml==6.0.2 # via pre-commit -requests==2.31.0 +requests==2.32.3 # via flit -toml==0.10.2 - # via pre-commit -tomli==2.0.1 +tomli==2.0.2 # via - # black # build # coverage # pip-tools - # pyproject-hooks # pytest tomli-w==1.0.0 # via flit -typing-extensions==4.7.1 - # via black -urllib3==2.0.7 +urllib3==2.2.3 # via requests -virtualenv==20.25.0 +virtualenv==20.27.0 # via pre-commit -wheel==0.42.0 +wheel==0.44.0 # via - # -r dev.in + # -r requirements/dev.in # pip-tools -zipp==3.15.0 +zipp==3.20.2 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: