Skip to content

Commit

Permalink
Merge pull request #22 from bhky/py311-support
Browse files Browse the repository at this point in the history
Python 3.11 support
  • Loading branch information
bhky authored Dec 21, 2023
2 parents 8e5a5f5 + 264d7a2 commit f7ebf8e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ "3.8", "3.9", "3.10" ]
python: [ "3.9", "3.10", "3.11" ]
backend: [ tensorflow, jax ]
include:
- backend: tensorflow
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A simple API is provided for making predictions on images and videos.

# Installation

Tested with TensorFlow and JAX, for Python 3.8, 3.9, and 3.10.
Tested with TensorFlow and JAX, for Python 3.9, 3.10, and 3.11.

A note on PyTorch:

Expand Down
2 changes: 1 addition & 1 deletion opennsfw2/_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def preprocess_image(
pil_image_resized.save(fh_im, format="JPEG")
fh_im.seek(0)

image: NDFloat32Array = skimage.io.imread(
image: NDFloat32Array = skimage.io.imread( # type: ignore
fh_im, as_gray=False
).astype(np.float32)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ matplotlib>=3.0.0
numpy>=1.22.0
opencv-python>=4.0.0.0
Pillow>=8.0.0
scikit-image==0.21.0 # Unpin when support for Python 3.8 will be dropped.
scikit-image>=0.21.0
tqdm>=4.62
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ classifiers =

[options]
packages = find:
python_requires = >=3.8
python_requires = >=3.9
install_requires =
gdown>=4.2.0
keras>=3.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/run_code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ set -e

find opennsfw2 -iname "*.py" | grep -v -e "__init__.py" | xargs -L 1 pylint --errors-only
find opennsfw2 -iname "*.py" | grep -v -e "__init__.py" | xargs -L 1 pylint --exit-zero
find opennsfw2 -iname "*.py" | grep -v -e "__init__.py" | xargs -L 1 mypy --strict --implicit-reexport --disable-error-code attr-defined
find opennsfw2 -iname "*.py" | grep -v -e "__init__.py" | xargs -L 1 mypy --strict --implicit-reexport --disable-error-code attr-defined --disable-error-code unused-ignore
find tests -iname "*.py" | xargs -L 1 python3 -m unittest

0 comments on commit f7ebf8e

Please sign in to comment.