diff --git a/bin/coverage.sh b/bin/coverage.sh index 651497b2..96058172 100755 --- a/bin/coverage.sh +++ b/bin/coverage.sh @@ -18,7 +18,7 @@ pip uninstall -y cython pip install --pre cython # unpinned to pick up new releases in CI # pip install cython==3.1.0a1 # known working version for Python < 3.13 -meson setup build -Dcoverage=true +meson setup build -Dcoverage=true -Dflint_version_check=false spin run -- coverage run $RC -m flint.test $@ coverage report $RC -m --sort=cover coverage html $RC diff --git a/src/flint/flint_base/flint_base.pyx b/src/flint/flint_base/flint_base.pyx index 70e4d696..caf6e8ef 100644 --- a/src/flint/flint_base/flint_base.pyx +++ b/src/flint/flint_base/flint_base.pyx @@ -474,7 +474,7 @@ cdef class flint_mpoly_context(flint_elem): fmpz_mpoly_ctx(3, '', ('y', 'z', 'b')) """ nvars = self.nvars() - gen_idxs = set(self.variable_to_index(i) for i in gens) + gen_idxs = {self.variable_to_index(i) for i in gens} if len(gens) > nvars: raise ValueError(f"expected at most {nvars} unique generators, got {len(gens)}") diff --git a/src/flint/types/_gr.pyx b/src/flint/types/_gr.pyx index f1a2a13e..1c8c590b 100644 --- a/src/flint/types/_gr.pyx +++ b/src/flint/types/_gr.pyx @@ -602,7 +602,7 @@ cdef class gr_ctx(flint_ctx): ### # Square Roots - def is_square(self, x) -> bool | None: + def is_square(self, x): """ Returns whether x is a perfect square in the context. """ diff --git a/src/flint/typing.py b/src/flint/typing.py index 5e6e1136..11c71180 100644 --- a/src/flint/typing.py +++ b/src/flint/typing.py @@ -10,12 +10,14 @@ Iterator, Iterable, Any, - Self, Mapping, Sequence, overload, ) +if TYPE_CHECKING: + from typing import Self + from .flint_base.flint_base import ( flint_elem, flint_scalar,