Skip to content

Commit e452a39

Browse files
author
Release Manager
committed
gh-38696: some pep8 fixes in sage/all.py This is fixing E272 multiple spaces before keyword in all.py ### 📝 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: #38696 Reported by: Frédéric Chapoton Reviewer(s): Frédéric Chapoton, Kwankyu Lee
2 parents 0490b79 + cbd9c2d commit e452a39

File tree

1 file changed

+70
-59
lines changed

1 file changed

+70
-59
lines changed

src/sage/all.py

Lines changed: 70 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
sage: def is_not_allowed(frame):
2929
....: module = inspect.getmodule(frame)
3030
....: if module is None: return False
31-
....: return not any(module.__name__.startswith(name) for name in allowed)
31+
....: return not any(module.__name__.startswith(name)
32+
....: for name in allowed)
3233
sage: [inspect.getmodule(f).__name__ for f in frames if is_not_allowed(f)]
3334
[]
3435
@@ -57,97 +58,98 @@
5758
import operator
5859
import math
5960

60-
################ end setup warnings ###############################
61+
# ############### end setup warnings ###############################
6162

62-
from sage.all__sagemath_repl import * # includes .all__sagemath_objects, .all__sagemath_environment
63+
from sage.all__sagemath_repl import *
64+
# this includes .all__sagemath_objects, .all__sagemath_environment
6365

64-
###################################################################
66+
# ##################################################################
6567

6668
# This import also sets up the interrupt handler
6769
from cysignals.signals import (AlarmInterrupt, SignalError,
68-
sig_on_reset as sig_on_count)
70+
sig_on_reset as sig_on_count)
6971

70-
from time import sleep
72+
from time import sleep
7173
from functools import reduce # in order to keep reduce in python3
7274

7375
import sage.misc.lazy_import
7476

75-
from sage.misc.all import * # takes a while
76-
from sage.typeset.all import *
77+
from sage.misc.all import * # takes a while
78+
from sage.typeset.all import *
7779

7880
from sage.misc.sh import sh
7981

80-
from sage.libs.all import *
82+
from sage.libs.all import *
8183
from sage.data_structures.all import *
8284

83-
from sage.structure.all import *
84-
from sage.rings.all import *
85-
from sage.arith.all import *
86-
from sage.matrix.all import *
87-
88-
from sage.symbolic.all import *
89-
from sage.modules.all import *
90-
from sage.monoids.all import *
91-
from sage.algebras.all import *
92-
from sage.modular.all import *
93-
from sage.sat.all import *
94-
from sage.schemes.all import *
95-
from sage.graphs.all import *
96-
from sage.groups.all import *
97-
from sage.arith.power import generic_power as power
98-
from sage.databases.all import *
85+
from sage.structure.all import *
86+
from sage.rings.all import *
87+
from sage.arith.all import *
88+
from sage.matrix.all import *
89+
90+
from sage.symbolic.all import *
91+
from sage.modules.all import *
92+
from sage.monoids.all import *
93+
from sage.algebras.all import *
94+
from sage.modular.all import *
95+
from sage.sat.all import *
96+
from sage.schemes.all import *
97+
from sage.graphs.all import *
98+
from sage.groups.all import *
99+
from sage.arith.power import generic_power as power
100+
from sage.databases.all import *
99101
from sage.categories.all import *
100-
from sage.sets.all import *
102+
from sage.sets.all import *
101103
from sage.probability.all import *
102104
from sage.interfaces.all import *
103105

104-
from sage.functions.all import *
105-
from sage.calculus.all import *
106+
from sage.functions.all import *
107+
from sage.calculus.all import *
106108

107-
from sage.cpython.all import *
109+
from sage.cpython.all import *
108110

109-
from sage.crypto.all import *
111+
from sage.crypto.all import *
110112
import sage.crypto.mq as mq
111113

112-
from sage.plot.all import *
113-
from sage.plot.plot3d.all import *
114+
from sage.plot.all import *
115+
from sage.plot.plot3d.all import *
114116

115-
from sage.coding.all import *
116-
from sage.combinat.all import *
117+
from sage.coding.all import *
118+
from sage.combinat.all import *
117119

118120
from sage.lfunctions.all import *
119121

120-
from sage.geometry.all import *
121-
from sage.geometry.triangulation.all import *
122-
from sage.geometry.riemannian_manifolds.all import *
122+
from sage.geometry.all import *
123+
from sage.geometry.triangulation.all import *
124+
from sage.geometry.riemannian_manifolds.all import *
123125

124-
from sage.dynamics.all import *
126+
from sage.dynamics.all import *
125127

126-
from sage.homology.all import *
128+
from sage.homology.all import *
127129

128-
from sage.topology.all import *
130+
from sage.topology.all import *
129131

130132
from sage.quadratic_forms.all import *
131133

132-
from sage.games.all import *
134+
from sage.games.all import *
133135

134-
from sage.logic.all import *
136+
from sage.logic.all import *
135137

136-
from sage.numerical.all import *
138+
from sage.numerical.all import *
137139

138-
from sage.stats.all import *
140+
from sage.stats.all import *
139141
import sage.stats.all as stats
140142

141-
from sage.parallel.all import *
143+
from sage.parallel.all import *
142144

143-
from sage.ext.fast_callable import fast_callable
144-
from sage.ext.fast_eval import fast_float
145+
from sage.ext.fast_callable import fast_callable
146+
from sage.ext.fast_eval import fast_float
145147

146148
from sage.sandpiles.all import *
147149

148-
from sage.tensor.all import *
150+
from sage.tensor.all import *
149151

150-
from sage.matroids.all import *
152+
from sage.matroids.all import *
151153

152154
from sage.game_theory.all import *
153155

@@ -167,7 +169,7 @@
167169
_init_qqbar()
168170

169171
###########################################################
170-
#### WARNING:
172+
# WARNING:
171173
# DO *not* import numpy / matplotlib / networkx here!!
172174
# Each takes a surprisingly long time to initialize,
173175
# and that initialization should be done more on-the-fly
@@ -191,20 +193,29 @@
191193

192194
from sage.misc.persist import register_unpickle_override
193195
register_unpickle_override('sage.categories.category', 'Sets', Sets)
194-
register_unpickle_override('sage.categories.category_types', 'HeckeModules', HeckeModules)
195-
register_unpickle_override('sage.categories.category_types', 'Objects', Objects)
196-
register_unpickle_override('sage.categories.category_types', 'Rings', Rings)
197-
register_unpickle_override('sage.categories.category_types', 'Fields', Fields)
198-
register_unpickle_override('sage.categories.category_types', 'VectorSpaces', VectorSpaces)
199-
register_unpickle_override('sage.categories.category_types', 'Schemes_over_base', sage.categories.schemes.Schemes_over_base)
200-
register_unpickle_override('sage.categories.category_types', 'ModularAbelianVarieties', ModularAbelianVarieties)
196+
register_unpickle_override('sage.categories.category_types', 'HeckeModules',
197+
HeckeModules)
198+
register_unpickle_override('sage.categories.category_types', 'Objects',
199+
Objects)
200+
register_unpickle_override('sage.categories.category_types', 'Rings',
201+
Rings)
202+
register_unpickle_override('sage.categories.category_types', 'Fields',
203+
Fields)
204+
register_unpickle_override('sage.categories.category_types', 'VectorSpaces',
205+
VectorSpaces)
206+
register_unpickle_override('sage.categories.category_types',
207+
'Schemes_over_base',
208+
sage.categories.schemes.Schemes_over_base)
209+
register_unpickle_override('sage.categories.category_types',
210+
'ModularAbelianVarieties',
211+
ModularAbelianVarieties)
201212
register_unpickle_override('sage.libs.pari.gen_py', 'pari', pari)
202213

203214
# Cache the contents of star imports.
204215
sage.misc.lazy_import.save_cache_file()
205216

206217

207-
### Debugging for Singular, see trac #10903
218+
# ##### Debugging for Singular, see issue #10903
208219
# from sage.libs.singular.ring import poison_currRing
209220
# sys.settrace(poison_currRing)
210221

@@ -226,7 +237,7 @@
226237
sage.misc.lazy_import.finish_startup()
227238

228239

229-
### Python broke large ints; see trac #34506
240+
# Python broke large ints; see trac #34506
230241

231242
if hasattr(sys, "set_int_max_str_digits"):
232243
sys.set_int_max_str_digits(0)

0 commit comments

Comments
 (0)