Skip to content

Commit

Permalink
gh-35244: fix pep E303 in all folders starting with [defghi]
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
### 📚 Description

This fixes all pycodestyle warning about E303 in all folders whose first
letter is among `defghi`.

```E303 too many blank lines```


<!-- Describe your changes here in detail -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If it resolves an open issue, please link to the issue here. For
example "Closes #1337" -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [x] I have made sure that the title is self-explanatory and the
description concisely explains the PR.
- [ ] I have linked an issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies
<!-- List all open pull requests that this PR logically depends on -->
<!--
- #xyz: short description why this is a dependency
- #abc: ...
-->
    
URL: #35244
Reported by: Frédéric Chapoton
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed Mar 31, 2023
2 parents 88de5ab + 2b32a1b commit 211c2a1
Show file tree
Hide file tree
Showing 48 changed files with 0 additions and 231 deletions.
2 changes: 0 additions & 2 deletions src/sage/data_structures/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,6 @@ def _approximate_order(self):
# " support")
return self._left._approximate_order * self._right._approximate_order


def get_coefficient(self, n):
r"""
Return the ``n``-th coefficient of ``self``.
Expand Down Expand Up @@ -2765,7 +2764,6 @@ def order(self):
"""
return self._series.order() + self._shift


def __getitem__(self, n):
"""
Return the ``n``-th coefficient of ``self``.
Expand Down
1 change: 0 additions & 1 deletion src/sage/databases/findstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2919,7 +2919,6 @@ def browse(self):
"""
webbrowser.open(FINDSTAT_URL_STATISTICS + self.id_str())


def info(self):
"""
Print a detailed description of the compound statistic.
Expand Down
14 changes: 0 additions & 14 deletions src/sage/databases/knotinfo_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ def sobj_column(self):
"""
return 'column_dict.sobj'


def sobj_data(self, column):
r"""
Return the file name under which the data of the given
Expand Down Expand Up @@ -311,13 +310,10 @@ def diagram_url(self, fname, single=False):
else:
return '%sdiagram_display.php?%s' %(self.url(), fname)


knots = ['https://knotinfo.math.indiana.edu/', 'knotinfo_data_complete']
links = ['https://linkinfo.sitehost.iu.edu/', 'linkinfo_data_complete']




#----------------------------------------------------------------------------------------------------------------------------
# Class to provide data for knots and links from the KnotInfo web-page
#----------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -406,7 +402,6 @@ def create_filecache(self, force=False):
self._create_data_sobj(sobj_path=sobj_path)
return


def version(self):
r"""
Return the version of the database currently installed on the device.
Expand Down Expand Up @@ -439,7 +434,6 @@ def version(self):
from database_knotinfo import version
return version()


def demo_version(self):
r"""
Return whether the KnotInfo databases are installed completely or
Expand Down Expand Up @@ -483,7 +477,6 @@ def knot_list(self):
self._knot_list = link_list()
return self._knot_list


def link_list(self):
r"""
Return the LinkInfo table rows as Python list.
Expand Down Expand Up @@ -557,8 +550,6 @@ def _create_col_dict_sobj(self, sobj_path=None):

save(column_dict, '%s/%s' %(sobj_path, self.filename.knots.sobj_column()))



def _create_data_sobj(self, sobj_path=None):
r"""
Create ``sobj`` files containing the contents of the whole table.
Expand Down Expand Up @@ -621,7 +612,6 @@ def _create_data_sobj(self, sobj_path=None):

save(row_dict, '%s/%s' %(sobj_path, self.filename.knots.sobj_row()))


@cached_method
def columns(self):
r"""
Expand All @@ -639,7 +629,6 @@ def columns(self):
column_dict = self.read_column_dict()
return KnotInfoColumns('Columns', column_dict)


# -------------------------------------------------------------------------------------------------------------
# read the dictionary for the column names from sobj-file
# -------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -717,7 +706,6 @@ def row_names(self):
names = self.read(self.columns().name)
return {k:names[v[0]] for k, v in row_dict.items()}


# -------------------------------------------------------------------------------------------------------------
# read the number of knots contained in the database (without proper links) from the according sobj-file.
# -------------------------------------------------------------------------------------------------------------
Expand All @@ -741,7 +729,6 @@ def read_num_knots(self):
self.demo_version()
return self._num_knots


# -------------------------------------------------------------------------------------------------------------
# read an sobj-file obtained from KnotInfo database
# -------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -803,7 +790,6 @@ def _test_database(self, **options):
tester.assertTrue(all(L.is_recoverable(unique=False) for L, in sample))



column_demo_sample = {
'name': ['Name', KnotInfoColumnTypes.KnotsAndLinks],
'name_unoriented': ['Name - Unoriented', KnotInfoColumnTypes.OnlyLinks],
Expand Down
1 change: 0 additions & 1 deletion src/sage/doctest/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ def report(self, source, timeout, return_code, results, output, pid=None):
import traceback
log(traceback.format_exc(), end="")


def finalize(self):
"""
Print out the postscript that summarizes the doctests that were run.
Expand Down
1 change: 0 additions & 1 deletion src/sage/features/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ def resolution(self):
return self._cache_resolution



class FeatureNotPresentError(RuntimeError):
r"""
A missing feature error.
Expand Down
1 change: 0 additions & 1 deletion src/sage/finance/markov_multifractal.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ def simulations(self, n, k=1):
self.__kbar, self.gamma())



## def ml_estimation(v, kbar, M):
## """
## Compute parameters that model the time series v,
Expand Down
1 change: 0 additions & 1 deletion src/sage/functions/exp_integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ def _evalf_(self, z, parent=None, algorithm=None):
import mpmath
return mpmath_utils_call(mpmath.e1, z, parent=parent)


def _print_latex_(self, z):
r"""
Custom ``_print_latex_`` method.
Expand Down
1 change: 0 additions & 1 deletion src/sage/games/hexad.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def view_list(L):
return matrix(GF(2), 3, 3, lambda x, y: 1 if (x,y) in L else 0)



def picture_set(A, L):
"""
This is needed in the :meth:`Minimog.find_hexad` function below.
Expand Down
1 change: 0 additions & 1 deletion src/sage/games/sudoku.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ def to_matrix(self):
from sage.matrix.constructor import matrix
return matrix(ZZ, self.n*self.n, self.puzzle)


def to_ascii(self):
r"""
Construct an ASCII-art version of a Sudoku puzzle.
Expand Down
1 change: 0 additions & 1 deletion src/sage/geometry/cone.py
Original file line number Diff line number Diff line change
Expand Up @@ -6779,7 +6779,6 @@ def is_valid(K):
K = Cone(rays, lattice=L)
rays = list(K.rays()) # Avoid re-normalizing next time around


if strictly_convex is not None:
if strictly_convex:
if not K.is_strictly_convex():
Expand Down
1 change: 0 additions & 1 deletion src/sage/geometry/fan_isomorphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from sage.geometry.cone import Cone



class FanNotIsomorphicError(Exception):
"""
Exception to return if there is no fan isomorphism
Expand Down
1 change: 0 additions & 1 deletion src/sage/geometry/hyperplane_arrangement/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def make_parent(base_ring, dimension, names=None):
return HyperplaneArrangements(base_ring, names=names)



class HyperplaneArrangementLibrary():
"""
The library of hyperplane arrangements.
Expand Down
3 changes: 0 additions & 3 deletions src/sage/geometry/hyperplane_arrangement/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,6 @@ def plot(hyperplane_arrangement, **kwds):
return p





def plot_hyperplane(hyperplane, **kwds):
r"""
Return the plot of a single hyperplane.
Expand Down
2 changes: 0 additions & 2 deletions src/sage/geometry/newton_polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,6 @@ def reverse(self, degree=None):
return parent(polyhedron)




class ParentNewtonPolygon(Parent, UniqueRepresentation):
r"""
Construct a Newton polygon.
Expand Down
1 change: 0 additions & 1 deletion src/sage/geometry/polyhedron/backend_polymake.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,6 @@ def __setstate__(self, state):
inequalities = self.inequalities()
equations = self.equations()


p = self._polymake_polytope_from_Vrepresentation_and_Hrepresentation([vertices, rays, lines], [inequalities, equations])
if p is not None:
self._polymake_polytope = p
Expand Down
1 change: 0 additions & 1 deletion src/sage/geometry/polyhedron/backend_ppl.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ def _convert_constraints_to_ppl(ieqs, eqns):
return cs



#########################################################################
class Polyhedron_QQ_ppl(Polyhedron_ppl, Polyhedron_QQ):
r"""
Expand Down
1 change: 0 additions & 1 deletion src/sage/geometry/polyhedron/base3.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ def face_generator(self, face_dimension=None, algorithm=None, **kwds):
if 'dual' in kwds and dual is None:
dual = kwds['dual']


from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator import FaceIterator_geom
return FaceIterator_geom(self, output_dimension=face_dimension, dual=dual)

Expand Down
1 change: 0 additions & 1 deletion src/sage/geometry/polyhedron/base_RDF.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from .base import Polyhedron_base



class Polyhedron_RDF(Polyhedron_base):
"""
Base class for polyhedra over ``RDF``.
Expand Down
1 change: 0 additions & 1 deletion src/sage/geometry/polyhedron/ppl_lattice_polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def LatticePolytope_PPL(*args):
return polytope_class(gs)



########################################################################
class LatticePolytope_PPL_class(C_Polyhedron):
"""
Expand Down
1 change: 0 additions & 1 deletion src/sage/geometry/polyhedron/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,6 @@ def type(self):
"""
return self.EQUATION


def is_equation(self):
"""
Tests if this object is an equation. By construction, it must be.
Expand Down
Loading

0 comments on commit 211c2a1

Please sign in to comment.