Skip to content

Commit 7df8be8

Browse files
authored
Merge pull request #344 from bgilbert/slim
workflows: switch small jobs to ubuntu-slim
2 parents 523fbb6 + 591a9e1 commit 7df8be8

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

.github/maintainer/mkmaintainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
from __future__ import annotations
44

.github/workflows/python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
jobs:
1717
pre-commit:
1818
name: Rerun pre-commit checks
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-slim
2020
outputs:
2121
dist-base: ${{ steps.paths.outputs.dist }}
2222
docs-base: ${{ steps.paths.outputs.docs }}
@@ -252,7 +252,7 @@ jobs:
252252
docs:
253253
name: Docs
254254
needs: pre-commit
255-
runs-on: ubuntu-latest
255+
runs-on: ubuntu-slim
256256
steps:
257257
- name: Check out repo
258258
uses: actions/checkout@v5
@@ -279,7 +279,7 @@ jobs:
279279
name: pypi
280280
url: https://pypi.org/p/openslide-python
281281
needs: [pre-commit, tests, windows]
282-
runs-on: ubuntu-latest
282+
runs-on: ubuntu-slim
283283
concurrency: release-${{ github.ref }}
284284
permissions:
285285
contents: write

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ repos:
5858
hooks:
5959
- id: mypy
6060
name: Check Python types
61-
additional_dependencies: [flask, openslide-bin, pillow, types-PyYAML, types-setuptools]
61+
additional_dependencies: [flask, openslide-bin, pillow >= 12.1.0, types-PyYAML, types-setuptools]
6262

6363
- repo: https://github.com/rstcheck/rstcheck
6464
rev: v6.2.5

openslide/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,7 @@ def detect_format(cls, filename: lowlevel.Filename) -> str | None:
394394
If the file format is not recognized, return None."""
395395
try:
396396
with Image.open(filename) as img:
397-
# img currently resolves as Any
398-
# https://github.com/python-pillow/Pillow/pull/8362
399-
return img.format # type: ignore[no-any-return]
397+
return img.format
400398
except OSError:
401399
return None
402400

0 commit comments

Comments
 (0)