Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pull_request_rules:
- "#approved-reviews-by>=1"
- label=automerge
- status-success=Lint
- status-success=Typing Successful
- status-success=Test Successful
- status-success=Docker Test Successful
- status-success=Windows Test Successful
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ jobs:
uses: astral-sh/setup-uv@v7
- name: Lint
run: uvx --with tox-uv tox -e lint
- name: Mypy
run: uvx --with tox-uv tox -e mypy
52 changes: 52 additions & 0 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Typing

on: [push, pull_request, workflow_dispatch]

permissions: {}

env:
FORCE_COLOR: 1
PREK_COLOR: always
RUFF_OUTPUT_FORMAT: github

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
typing:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: [
"3.14",
"3.13",
"3.12",
"3.11",
"3.10",
]

name: Typing Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Typing
run: uvx --with tox-uv tox -e mypy -- --python-version=${{ matrix.python-version }}

success:
permissions:
contents: none
needs: typing
runs-on: ubuntu-latest
name: Typing Successful
steps:
- name: Success
run: echo Typing Successful
2 changes: 1 addition & 1 deletion Tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class FP(io.BytesIO):
from collections.abc import Buffer

def write(self, data: Buffer) -> int:
return len(data)
return len(bytes(data))

else:

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ testpaths = [
]

[tool.mypy]
python_version = "3.10"
pretty = true
disallow_any_generics = true
disallow_untyped_defs = true
Expand Down
1 change: 1 addition & 0 deletions src/PIL/GifImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,7 @@ class Collector(BytesIO):
data = []

def write(self, data: Buffer) -> int:
data = bytes(data)
self.data.append(data)
return len(data)

Expand Down
Loading