From f8d63e8f74c8646e97e6229fe8aadacde9474741 Mon Sep 17 00:00:00 2001 From: Jan-Eric Nitschke <47750513+JanEricNitschke@users.noreply.github.com> Date: Mon, 15 Sep 2025 10:34:43 +0200 Subject: [PATCH 1/2] Fix stubs for openpyxl.descriptors.sequence.UniqueSequence.seq_types --- stubs/openpyxl/@tests/stubtest_allowlist.txt | 4 ---- stubs/openpyxl/openpyxl/descriptors/sequence.pyi | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/stubs/openpyxl/@tests/stubtest_allowlist.txt b/stubs/openpyxl/@tests/stubtest_allowlist.txt index a01ce24b836c..35991ce00df4 100644 --- a/stubs/openpyxl/@tests/stubtest_allowlist.txt +++ b/stubs/openpyxl/@tests/stubtest_allowlist.txt @@ -187,7 +187,3 @@ openpyxl.worksheet.smart_tag.CellSmartTagPr.__init__ openpyxl.worksheet.smart_tag.CellSmartTags.__init__ openpyxl.worksheet.table.TableColumn.__init__ openpyxl.worksheet.table.XMLColumnProps.__init__ - -# FIXME: new stubtest errors from mypy v1.18.1 that need to be looked at more closely. -# See https://github.com/python/typeshed/pull/14699 -openpyxl.descriptors.sequence.UniqueSequence.seq_types diff --git a/stubs/openpyxl/openpyxl/descriptors/sequence.pyi b/stubs/openpyxl/openpyxl/descriptors/sequence.pyi index ba5cb0640f08..550b4f01a27d 100644 --- a/stubs/openpyxl/openpyxl/descriptors/sequence.pyi +++ b/stubs/openpyxl/openpyxl/descriptors/sequence.pyi @@ -38,7 +38,7 @@ class Sequence(Descriptor[_ContainerT]): # `_T` is the type of the elements in the sequence. class UniqueSequence(Sequence[set[_T]]): - seq_types: tuple[type[list[_T]], type[tuple[_T, ...]], type[set[_T]]] + seq_types: tuple[type, ...] # defaults to `list`, `tuple`, `set` container: type[set[_T]] # See `Sequence` for the meaning of `_ContainerT`. From 80fe8dce16dd3eb2cc5ffe02332b64920625b7c8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 08:38:26 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stubs/openpyxl/openpyxl/descriptors/sequence.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/openpyxl/openpyxl/descriptors/sequence.pyi b/stubs/openpyxl/openpyxl/descriptors/sequence.pyi index 550b4f01a27d..ffad3ba356fc 100644 --- a/stubs/openpyxl/openpyxl/descriptors/sequence.pyi +++ b/stubs/openpyxl/openpyxl/descriptors/sequence.pyi @@ -38,7 +38,7 @@ class Sequence(Descriptor[_ContainerT]): # `_T` is the type of the elements in the sequence. class UniqueSequence(Sequence[set[_T]]): - seq_types: tuple[type, ...] # defaults to `list`, `tuple`, `set` + seq_types: tuple[type, ...] # defaults to `list`, `tuple`, `set` container: type[set[_T]] # See `Sequence` for the meaning of `_ContainerT`.