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
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Multimedia :: Graphics",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = "~=3.9"
requires-python = "~=3.10"
dependencies = [
"colorama; sys_platform == 'win32'",
"deprecation",
Expand Down Expand Up @@ -97,7 +97,7 @@ exclude_lines = [
skip_covered = true

[tool.ruff]
target-version = "py39"
target-version = "py310"
exclude = ["migrations"]
lint.select = ["ALL"]
lint.ignore = [
Expand Down
2 changes: 1 addition & 1 deletion qrcode/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def __mod__(self, other):

num = [
item ^ gexp(glog(other_item) + ratio)
for item, other_item in zip(self, other)
for item, other_item in zip(self, other, strict=False)
]
if difference:
num.extend(self[-difference:])
Expand Down
3 changes: 1 addition & 2 deletions qrcode/image/styles/colormasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def extrap_num(self, n1, n2, interped_num):
# find the interpolation coefficient between two numbers
def extrap_color(self, col1, col2, interped_color):
normed = []
for c1, c2, ci in zip(col1, col2, interped_color):
for c1, c2, ci in zip(col1, col2, interped_color, strict=False):
extrap = self.extrap_num(c1, c2, ci)
if extrap is not None:
normed.append(extrap)
Expand Down Expand Up @@ -221,5 +221,4 @@ def initialize(self, styledPilImage, image):
self.color_img = self.color_img.resize(image.size)

def get_fg_pixel(self, image, x, y):
width, _ = image.size
return self.color_img.getpixel((x, y))
8 changes: 3 additions & 5 deletions qrcode/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import sys
import warnings
from bisect import bisect_left
from typing import Generic, Literal, NamedTuple, Optional, TypeVar, cast, overload
from typing import Generic, NamedTuple, TypeVar, cast, overload

from qrcode import constants, exceptions, util
from qrcode.image.base import BaseImage
from qrcode.image.pure import PyPNGImage

ModulesType = list[list[Optional[bool]]]
ModulesType = list[list[bool | None]]
# Cache modules generated just based on the QR Code version
precomputed_qr_blanks: dict[int, ModulesType] = {}

Expand Down Expand Up @@ -320,9 +320,7 @@ def get_module(x, y) -> int:
out.flush()

@overload
def make_image(
self, image_factory: Literal[None] = None, **kwargs
) -> GenericImage: ...
def make_image(self, image_factory: None = None, **kwargs) -> GenericImage: ...

@overload
def make_image(
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[tox]
distribute = False
envlist = py{39,310,311,312,313}-{pil,png,none}
envlist = py{310,311,312,313,314}-{pil,png,none}
skip_missing_interpreters = True

[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.14: py314

[testenv]
commands =
Expand Down