Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/rings/finite_rings/hom_finite_field.pyx: Import ABC as Finit…
Browse files Browse the repository at this point in the history
…eField_base
  • Loading branch information
Matthias Koeppe committed Dec 5, 2022
1 parent 6323775 commit 473e9d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sage/rings/finite_rings/hom_finite_field.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ from sage.rings.integer cimport Integer
from sage.categories.homset import Hom
from sage.structure.element cimport Element

from sage.rings.finite_rings.finite_field_base import FiniteField
from sage.rings.finite_rings.finite_field_base import FiniteField as FiniteField_base
from sage.rings.morphism cimport RingHomomorphism, RingHomomorphism_im_gens, FrobeniusEndomorphism_generic
from sage.rings.finite_rings.finite_field_constructor import FiniteField

Expand Down Expand Up @@ -227,9 +227,9 @@ cdef class FiniteFieldHomomorphism_generic(RingHomomorphism_im_gens):
"""
domain = parent.domain()
codomain = parent.codomain()
if not isinstance(domain, FiniteField):
if not isinstance(domain, FiniteField_base):
raise TypeError("The domain is not a finite field or does not provide the required interface for finite fields")
if not isinstance(codomain, FiniteField):
if not isinstance(codomain, FiniteField_base):
raise TypeError("The codomain is not a finite field or does not provide the required interface for finite fields")
if domain.characteristic() != codomain.characteristic() or codomain.degree() % domain.degree() != 0:
raise ValueError("No embedding of %s into %s" % (domain, codomain))
Expand Down Expand Up @@ -522,7 +522,7 @@ cdef class FrobeniusEndomorphism_finite_field(FrobeniusEndomorphism_generic):
...
TypeError: The domain is not a finite field or does not provide the required interface for finite fields
"""
if not isinstance(domain, FiniteField):
if not isinstance(domain, FiniteField_base):
raise TypeError("The domain is not a finite field or does not provide the required interface for finite fields")
try:
n = Integer(n)
Expand Down

0 comments on commit 473e9d4

Please sign in to comment.