|
120 | 120 | # (at your option) any later version.
|
121 | 121 | # https://www.gnu.org/licenses/
|
122 | 122 | # ****************************************************************************
|
| 123 | +import os |
| 124 | +import shlex |
123 | 125 | from collections.abc import Hashable
|
124 | 126 | from copyreg import constructor as copyreg_constructor
|
125 | 127 | from functools import reduce
|
126 | 128 | from io import IOBase, StringIO
|
127 |
| -from subprocess import Popen, PIPE |
128 |
| -from warnings import warn |
129 |
| -import os |
130 |
| -import shlex |
| 129 | +from subprocess import PIPE, Popen |
| 130 | +from typing import TYPE_CHECKING, Literal |
131 | 131 |
|
| 132 | +import sage.geometry.abc |
132 | 133 | from sage.arith.misc import GCD as gcd
|
133 | 134 | from sage.features import PythonModule
|
134 |
| -from sage.features.palp import PalpExecutable |
135 | 135 | from sage.features.databases import DatabaseReflexivePolytopes
|
| 136 | +from sage.features.palp import PalpExecutable |
136 | 137 | from sage.geometry.cone import _ambient_space_point, integral_length
|
137 |
| -from sage.geometry.point_collection import (PointCollection, |
138 |
| - read_palp_point_collection) |
139 |
| -from sage.geometry.toric_lattice import ToricLattice, ToricLattice_generic |
140 | 138 | from sage.geometry.convex_set import ConvexSet_compact
|
| 139 | +from sage.geometry.point_collection import PointCollection, read_palp_point_collection |
| 140 | +from sage.geometry.toric_lattice import ToricLattice, ToricLattice_generic |
141 | 141 | from sage.matrix.constructor import matrix
|
142 | 142 | from sage.misc.cachefunc import cached_method
|
143 | 143 | from sage.misc.flatten import flatten
|
|
149 | 149 | from sage.rings.rational_field import QQ
|
150 | 150 | from sage.sets.set import Set_generic
|
151 | 151 | from sage.structure.element import Matrix
|
152 |
| -from sage.structure.richcmp import richcmp_method, richcmp |
| 152 | +from sage.structure.richcmp import richcmp, richcmp_method |
153 | 153 | from sage.structure.sage_object import SageObject
|
154 | 154 | from sage.structure.sequence import Sequence
|
155 |
| -import sage.geometry.abc |
156 |
| - |
157 | 155 |
|
158 | 156 | lazy_import("sage.combinat.posets.posets", 'FinitePoset')
|
159 | 157 | lazy_import("sage.geometry.hasse_diagram", 'lattice_from_incidences')
|
|
167 | 165 | lazy_import('ppl', 'point', as_='PPL_point',
|
168 | 166 | feature=PythonModule("ppl", spkg='pplpy', type='standard'))
|
169 | 167 |
|
| 168 | +if TYPE_CHECKING: |
| 169 | + from sage.misc.sage_input import SageInputBuilder, SageInputExpression |
| 170 | + |
170 | 171 |
|
171 | 172 | class SetOfAllLatticePolytopesClass(Set_generic):
|
172 | 173 | def _repr_(self) -> str:
|
@@ -570,7 +571,7 @@ def __init__(self, points=None, compute_vertices=None,
|
570 | 571 | self._ambient_facet_indices = tuple(ambient_facet_indices)
|
571 | 572 | self._vertices = ambient.vertices(self._ambient_vertex_indices)
|
572 | 573 |
|
573 |
| - def _sage_input_(self, sib, coerced): |
| 574 | + def _sage_input_(self, sib: SageInputBuilder, coerced: bool | Literal[2]) -> SageInputExpression: |
574 | 575 | """
|
575 | 576 | Return Sage command to reconstruct ``self``.
|
576 | 577 |
|
@@ -4443,7 +4444,7 @@ def _repr_(self):
|
4443 | 4444 | pass
|
4444 | 4445 | return result
|
4445 | 4446 |
|
4446 |
| - def _sage_input_(self, sib, coerced): |
| 4447 | + def _sage_input_(self, sib: SageInputBuilder, coerced: bool) -> SageInputExpression: |
4447 | 4448 | """
|
4448 | 4449 | Return Sage command to reconstruct ``self``.
|
4449 | 4450 |
|
|
0 commit comments