Skip to content

Commit e65ae5e

Browse files
author
Release Manager
committed
sagemathgh-38816: fix all pep E302 in manifolds and geometry this is about fixing the warning E302 expected 2 blank lines, found 1 in the `manifolds` and `geometry` folders. Purely scripted using `autopep8` ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. URL: sagemath#38816 Reported by: Frédéric Chapoton Reviewer(s): Vincent Macri
2 parents 1f9312f + 1f8dae9 commit e65ae5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+121
-0
lines changed

src/sage/geometry/cone_catalog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
# the top-level non-underscore functions defined in this module.
7373
#
7474

75+
7576
def _preprocess_args(ambient_dim, lattice):
7677
r"""
7778
Preprocess arguments for cone-constructing functions.

src/sage/geometry/cone_critical_angles.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
from sage.rings.real_double import RDF
4141
from sage.symbolic.constants import pi
4242

43+
4344
def _normalize_gevp_solution(gevp_solution):
4445
r"""
4546
Normalize the results of :func:`solve_gevp_nonzero` and

src/sage/geometry/hyperbolic_space/hyperbolic_coercion.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from sage.misc.lazy_import import lazy_import
3030
lazy_import('sage.misc.call', 'attrcall')
3131

32+
3233
class HyperbolicModelCoercion(Morphism):
3334
"""
3435
Abstract base class for morphisms between the hyperbolic models.
@@ -148,6 +149,7 @@ def __invert__(self):
148149
# From UHP #
149150
############
150151

152+
151153
class CoercionUHPtoPD(HyperbolicModelCoercion):
152154
"""
153155
Coercion from the UHP to PD model.
@@ -188,6 +190,7 @@ def image_isometry_matrix(self, x):
188190
return matrix([[1,-I],[-I,1]]) * x * matrix([[1,I],[I,1]]).conjugate()/Integer(2)
189191
return matrix([[1,-I],[-I,1]]) * x * matrix([[1,I],[I,1]])/Integer(2)
190192

193+
191194
class CoercionUHPtoKM(HyperbolicModelCoercion):
192195
"""
193196
Coercion from the UHP to KM model.
@@ -227,6 +230,7 @@ def image_isometry_matrix(self, x):
227230
"""
228231
return SL2R_to_SO21(x)
229232

233+
230234
class CoercionUHPtoHM(HyperbolicModelCoercion):
231235
"""
232236
Coercion from the UHP to HM model.
@@ -269,6 +273,7 @@ def image_isometry_matrix(self, x):
269273
# From PD #
270274
###########
271275

276+
272277
class CoercionPDtoUHP(HyperbolicModelCoercion):
273278
"""
274279
Coercion from the PD to UHP model.
@@ -318,6 +323,7 @@ def image_isometry_matrix(self, x):
318323
return matrix([[1,I],[I,1]]) * x * matrix([[1,-I],[-I,1]]).conjugate() / Integer(2)
319324
return matrix([[1,I],[I,1]]) * x * matrix([[1,-I],[-I,1]]) / Integer(2)
320325

326+
321327
class CoercionPDtoKM(HyperbolicModelCoercion):
322328
"""
323329
Coercion from the PD to KM model.
@@ -444,6 +450,7 @@ def image_isometry_matrix(self, x):
444450
"""
445451
return SO21_to_SL2R(x)
446452

453+
447454
class CoercionKMtoPD(HyperbolicModelCoercion):
448455
"""
449456
Coercion from the KM to PD model.
@@ -482,6 +489,7 @@ def image_isometry_matrix(self, x):
482489
return (matrix(2,[1,-I,-I,1]) * SO21_to_SL2R(x) *
483490
matrix(2,[1,I,I,1])/Integer(2))
484491

492+
485493
class CoercionKMtoHM(HyperbolicModelCoercion):
486494
"""
487495
Coercion from the KM to HM model.
@@ -524,6 +532,7 @@ def image_isometry_matrix(self, x):
524532
# From HM #
525533
###########
526534

535+
527536
class CoercionHMtoUHP(HyperbolicModelCoercion):
528537
"""
529538
Coercion from the HM to UHP model.
@@ -560,6 +569,7 @@ def image_isometry_matrix(self, x):
560569
"""
561570
return SO21_to_SL2R(x)
562571

572+
563573
class CoercionHMtoPD(HyperbolicModelCoercion):
564574
"""
565575
Coercion from the HM to PD model.
@@ -596,6 +606,7 @@ def image_isometry_matrix(self, x):
596606
return (matrix(2,[1,-I,-I,1]) * SO21_to_SL2R(x) *
597607
matrix(2,[1,I,I,1])/Integer(2))
598608

609+
599610
class CoercionHMtoKM(HyperbolicModelCoercion):
600611
"""
601612
Coercion from the HM to KM model.
@@ -635,6 +646,7 @@ def image_isometry_matrix(self, x):
635646
#####################################################################
636647
## Helper functions
637648

649+
638650
def SL2R_to_SO21(A):
639651
r"""
640652
Given a matrix in `SL(2, \RR)` return its irreducible representation in

src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ def attracting_fixed_point(self):
620620
fp = self._cached_isometry.attracting_fixed_point()
621621
return self.domain().get_point(fp)
622622

623+
623624
class HyperbolicIsometryUHP(HyperbolicIsometry):
624625
r"""
625626
Create a hyperbolic isometry in the UHP model.
@@ -881,6 +882,7 @@ def attracting_fixed_point(self): # UHP
881882
return self.domain().get_point(infinity)
882883
return self.domain().get_point(v[0] / v[1])
883884

885+
884886
class HyperbolicIsometryPD(HyperbolicIsometry):
885887
r"""
886888
Create a hyperbolic isometry in the PD model.
@@ -982,6 +984,7 @@ def _orientation_preserving(A): #PD
982984
return bool(A[1][0] == A[0][1].conjugate() and A[1][1] == A[0][0].conjugate()
983985
and abs(A[0][0]) - abs(A[0][1]) != 0)
984986

987+
985988
class HyperbolicIsometryKM(HyperbolicIsometry):
986989
r"""
987990
Create a hyperbolic isometry in the KM model.

src/sage/geometry/hyperbolic_space/hyperbolic_point.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474

7575
from sage.geometry.hyperbolic_space.hyperbolic_isometry import HyperbolicIsometry
7676

77+
7778
class HyperbolicPoint(Element):
7879
r"""
7980
Abstract base class for hyperbolic points. This class should never

src/sage/geometry/hyperplane_arrangement/check_freeness.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from sage.matrix.constructor import matrix
2727
import sage.libs.singular.function_factory as fun_fact
2828

29+
2930
def less_generators(X):
3031
"""
3132
Reduce the generator matrix of the module defined by ``X``.
@@ -63,6 +64,7 @@ def less_generators(X):
6364
Kd = set(range(X.nrows())).difference(K)
6465
X = X.matrix_from_rows(sorted(Kd))
6566

67+
6668
def construct_free_chain(A):
6769
"""
6870
Construct the free chain for the hyperplanes ``A``.

src/sage/geometry/lattice_polytope.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ def ReflexivePolytope(dim, n):
415415
# Sequences of reflexive polytopes
416416
_rp = [None] * 4
417417

418+
418419
def ReflexivePolytopes(dim):
419420
r"""
420421
Return the sequence of all 2- or 3-dimensional reflexive polytopes.
@@ -494,6 +495,7 @@ def is_LatticePolytope(x):
494495
deprecation(34307, "is_LatticePolytope is deprecated, use isinstance instead")
495496
return isinstance(x, LatticePolytopeClass)
496497

498+
497499
@richcmp_method
498500
class LatticePolytopeClass(ConvexSet_compact, Hashable, sage.geometry.abc.LatticePolytope):
499501
r"""
@@ -4982,6 +4984,7 @@ def part_of_point(self, i):
49824984

49834985
_palp_dimension = None
49844986

4987+
49854988
def _palp(command, polytopes, reduce_dimension=False):
49864989
r"""
49874990
Run ``command`` on vertices of given

src/sage/geometry/polyhedron/backend_polymake.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,8 @@ def _test_polymake_pickling(self, tester=None, other=None, **options):
724724
tester.assertEqual(P.AFFINE_HULL, P1.AFFINE_HULL)
725725

726726
#########################################################################
727+
728+
727729
class Polyhedron_QQ_polymake(Polyhedron_polymake, Polyhedron_QQ):
728730
r"""
729731
Polyhedra over `\QQ` with polymake.

src/sage/geometry/polyhedron/base0.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from sage.structure.element import Element
3636
import sage.geometry.abc
3737

38+
3839
class Polyhedron_base0(Element, sage.geometry.abc.Polyhedron):
3940
"""
4041
Initialization and basic access for polyhedra.

src/sage/geometry/polyhedron/base2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from sage.modules.free_module_element import vector
3838
from .base1 import Polyhedron_base1
3939

40+
4041
class Polyhedron_base2(Polyhedron_base1):
4142
"""
4243
Methods related to lattice points.

0 commit comments

Comments
 (0)