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

Commit

Permalink
git grep -l 'all import' src/sage/schemes | xargs sed -i.bak 's/[.]al…
Browse files Browse the repository at this point in the history
…l import Rings$/.rings import Rings/'
  • Loading branch information
Matthias Koeppe committed Aug 24, 2022
1 parent 0a0c014 commit 0a5c6f8
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/sage/schemes/generic/homset.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def _element_constructor_(self, x, check=True):
return self.domain()._morphism(self, x, check=check)

from sage.categories.map import Map
from sage.categories.all import Rings
from sage.categories.rings import Rings
if isinstance(x, Map) and x.category_for().is_subcategory(Rings()):
# x is a morphism of Rings
return SchemeMorphism_spec(self, x, check=check)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/generic/morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ def __init__(self, parent, phi, check=True):
"""
SchemeMorphism.__init__(self, parent)
if check:
from sage.categories.all import Rings
from sage.categories.rings import Rings
if not (isinstance(phi, Map) and phi.category_for().is_subcategory(Rings())):
raise TypeError("phi (=%s) must be a ring homomorphism" % phi)
if phi.domain() != parent.codomain().coordinate_ring():
Expand Down
4 changes: 2 additions & 2 deletions src/sage/schemes/generic/scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __init__(self, X=None, category=None):
"""
from sage.schemes.generic.morphism import is_SchemeMorphism
from sage.categories.map import Map
from sage.categories.all import Rings
from sage.categories.rings import Rings

if X is None:
self._base_ring = ZZ
Expand Down Expand Up @@ -1212,7 +1212,7 @@ def hom(self, x, Y=None):
(2, r)
"""
from sage.categories.map import Map
from sage.categories.all import Rings
from sage.categories.rings import Rings

if is_Scheme(x):
return self.Hom(x).natural_map()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/plane_conics/con_number_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def is_locally_solvable(self, p):
if ret == -1:
if self._local_obstruction is None:
from sage.categories.map import Map
from sage.categories.all import Rings
from sage.categories.rings import Rings
from sage.rings.qqbar import AA
from sage.rings.real_lazy import RLF

Expand Down
4 changes: 2 additions & 2 deletions src/sage/schemes/plane_conics/con_rational_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def has_rational_point(self, point=False, obstruction=False,
read_cache=read_cache)
if point or obstruction:
from sage.categories.map import Map
from sage.categories.all import Rings
from sage.categories.rings import Rings
if isinstance(ret[1], Map) and ret[1].category_for().is_subcategory(Rings()):
# ret[1] is a morphism of Rings
ret[1] = -1
Expand Down Expand Up @@ -222,7 +222,7 @@ def is_locally_solvable(self, p) -> bool:
True
"""
from sage.categories.map import Map
from sage.categories.all import Rings
from sage.categories.rings import Rings

D, T = self.diagonal_matrix()
abc = [D[j, j] for j in range(3)]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/toric/homset.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def _element_constructor_(self, x, check=True):
return SchemeMorphism_polynomial_toric_variety(self, x, check=check)

from sage.categories.map import Map
from sage.categories.all import Rings
from sage.categories.rings import Rings
if isinstance(x, Map) and x.category_for().is_subcategory(Rings()):
# x is a morphism of Rings
assert x.domain() is self.codomain().coordinate_ring()
Expand Down

0 comments on commit 0a5c6f8

Please sign in to comment.