Skip to content

Commit

Permalink
fix D412 - BlankLineAfterSection
Browse files Browse the repository at this point in the history
Signed-off-by: Nathaniel Starkman (@nstarman) <nstarkman@protonmail.com>
  • Loading branch information
nstarman committed Jan 31, 2023
1 parent 40638ec commit bfb192d
Show file tree
Hide file tree
Showing 46 changed files with 1 addition and 96 deletions.
2 changes: 0 additions & 2 deletions astropy/config/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ class set_temp_config(_SetTempPath):
Parameters
----------
path : str, optional
The directory (which must exist) in which to find the Astropy config
files, or create them if they do not already exist. If None, this
Expand Down Expand Up @@ -272,7 +271,6 @@ class set_temp_cache(_SetTempPath):
Parameters
----------
path : str
The directory (which must exist) in which to find the Astropy cache
files, or create them if they do not already exist. If None, this
Expand Down
3 changes: 0 additions & 3 deletions astropy/coordinates/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class IllegalHourError(RangeError):
Examples
--------
.. code-block:: python
if not 0 <= hr < 24:
Expand Down Expand Up @@ -90,7 +89,6 @@ class IllegalMinuteError(RangeError):
Examples
--------
.. code-block:: python
if not 0 <= min < 60:
Expand Down Expand Up @@ -140,7 +138,6 @@ class IllegalSecondError(RangeError):
Examples
--------
.. code-block:: python
if not 0 <= sec < 60:
Expand Down
1 change: 0 additions & 1 deletion astropy/coordinates/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ def get_transform(self, fromsys, tosys):
Notes
-----
A `~astropy.coordinates.CompositeTransform` is always returned, because
`~astropy.coordinates.CompositeTransform` is slightly more adaptable in
the way it can be called than other transform classes. Specifically, it
Expand Down
1 change: 0 additions & 1 deletion astropy/io/ascii/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class CsvWriter:
Examples
--------
>>> from astropy.io.ascii.core import CsvWriter
>>> writer = CsvWriter(delimiter=' ')
>>> print(writer.writerow(['hello', '', 'world']))
Expand Down
1 change: 0 additions & 1 deletion astropy/io/ascii/ecsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ class Ecsv(basic.Basic):
Examples
--------
>>> from astropy.table import Table
>>> ecsv_content = '''# %ECSV 0.9
... # ---
Expand Down
1 change: 0 additions & 1 deletion astropy/io/fits/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,6 @@ def __init__(self, input, ascii=False):
"""
Parameters
----------
input : sequence of `Column` or `ColDefs` or ndarray or `~numpy.recarray`
An existing table HDU, an existing `ColDefs`, or any multi-field
Numpy array or `numpy.recarray`.
Expand Down
1 change: 0 additions & 1 deletion astropy/io/fits/convenience.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ def delval(filename, keyword, *args, **kwargs):
Parameters
----------
filename : path-like or file-like
Name of the FITS file, or file object If opened, mode must be update
(rb+). An opened file object or `~gzip.GzipFile` object will be closed
Expand Down
1 change: 0 additions & 1 deletion astropy/io/fits/hdu/compressed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,6 @@ def scale(self, type=None, option="old", bscale=1, bzero=0):
Parameters
----------
type : str, optional
destination data type, use a string representing a numpy dtype
name, (e.g. ``'uint8'``, ``'int16'``, ``'float32'`` etc.). If is
Expand Down
1 change: 0 additions & 1 deletion astropy/io/fits/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ def fromstring(cls, data, sep=""):
Examples
--------
>>> from astropy.io.fits import Header
>>> hdr = Header({'SIMPLE': True})
>>> Header.fromstring(hdr.tostring()) == hdr
Expand Down
2 changes: 0 additions & 2 deletions astropy/io/fits/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class NotifierMixin:
Examples
--------
>>> class Widget(NotifierMixin):
... state = 1
... def __init__(self, name):
Expand Down Expand Up @@ -149,7 +148,6 @@ def first(iterable):
Examples
--------
>>> a = [1, 2, 3]
>>> first(a)
1
Expand Down
1 change: 0 additions & 1 deletion astropy/io/misc/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
Examples
--------
>>> from astropy.io.misc import yaml
>>> import astropy.units as u
>>> from astropy.time import Time
Expand Down
1 change: 0 additions & 1 deletion astropy/io/votable/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Warnings
--------
.. note::
Most of the following warnings indicate violations of the VOTable
specification. They should be reported to the authors of the
Expand Down
4 changes: 0 additions & 4 deletions astropy/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,13 @@ def log_to_file(self, filename, filter_level=None, filter_origin=None):
Notes
-----
By default, the logger already outputs log messages to a file set in
the Astropy configuration file. Using this context manager does not
stop log messages from being output to that file, nor does it stop log
messages from being printed to standard output.
Examples
--------
The context manager is used as::
with logger.log_to_file('myfile.log'):
Expand Down Expand Up @@ -471,13 +469,11 @@ def log_to_list(self, filter_level=None, filter_origin=None):
Notes
-----
Using this context manager does not stop log messages from being
output to standard output.
Examples
--------
The context manager is used as::
with logger.log_to_list() as log_list:
Expand Down
6 changes: 0 additions & 6 deletions astropy/modeling/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,6 @@ def bounding_box(self):
Examples
--------
Setting the ``bounding_box`` limits for a 1D and 2D model:
>>> from astropy.modeling.models import Gaussian1D, Gaussian2D
Expand Down Expand Up @@ -1605,7 +1604,6 @@ def without_units_for_data(self, **kwargs):
Notes
-----
This method is needed in order to be able to fit models with units in
the parameters, since we need to temporarily strip away the units from
the model during the fitting (which might be done by e.g. scipy
Expand Down Expand Up @@ -1656,7 +1654,6 @@ def output_units(self, **kwargs):
Notes
-----
This method is needed in order to be able to fit models with units in
the parameters, since we need to temporarily strip away the units from
the model during the fitting (which might be done by e.g. scipy
Expand Down Expand Up @@ -1698,7 +1695,6 @@ def with_units_from_data(self, **kwargs):
Notes
-----
This method is needed in order to be able to fit models with units in
the parameters, since we need to temporarily strip away the units from
the model during the fitting (which might be done by e.g. scipy
Expand Down Expand Up @@ -2330,7 +2326,6 @@ def coerce_units(
Examples
--------
Wrapping a unitless model to require and convert units:
>>> from astropy.modeling.models import Polynomial1D
Expand Down Expand Up @@ -4253,7 +4248,6 @@ def fix_inputs(modelinstance, values, bounding_boxes=None, selector_args=None):
Examples
--------
>>> from astropy.modeling.models import Gaussian2D
>>> g = Gaussian2D(1, 2, 3, 4, 5)
>>> gv = fix_inputs(g, {0: 2.5})
Expand Down
2 changes: 0 additions & 2 deletions astropy/modeling/functional_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,6 @@ class Scale(Fittable1DModel):
Notes
-----
If ``factor`` is a `~astropy.units.Quantity` then the units will be
stripped before the scaling operation.
Expand Down Expand Up @@ -3282,7 +3281,6 @@ class KingProjectedAnalytic1D(Fittable1DModel):
Notes
-----
This model approximates a King model with an analytic function. The derivation of this
equation can be found in King '62 (equation 14). This is just an approximation of the
full model and the parameters derived from this model should be taken with caution.
Expand Down
3 changes: 0 additions & 3 deletions astropy/modeling/mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class Mapping(FittableModel):
Examples
--------
>>> from astropy.modeling.models import Polynomial2D, Shift, Mapping
>>> poly1 = Polynomial2D(1, c0_0=1, c1_0=2, c0_1=3)
>>> poly2 = Polynomial2D(1, c0_0=1, c1_0=2.4, c0_1=2.1)
Expand Down Expand Up @@ -145,7 +144,6 @@ class Identity(Mapping):
Examples
--------
Transform ``(x, y)`` by a shift in x, followed by scaling the two inputs::
>>> from astropy.modeling.models import (Polynomial1D, Shift, Scale,
Expand Down Expand Up @@ -213,7 +211,6 @@ class UnitsMapping(Model):
Examples
--------
Wrapping a unitless model to require and convert units:
>>> from astropy.modeling.models import Polynomial1D, UnitsMapping
Expand Down
5 changes: 0 additions & 5 deletions astropy/modeling/physical_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class BlackBody(Fittable1DModel):
Notes
-----
Model formula:
.. math:: B_{\\nu}(T) = A \\frac{2 h \\nu^{3} / c^{2}}{exp(h \\nu / k T) - 1}
Expand Down Expand Up @@ -268,7 +267,6 @@ class Drude1D(Fittable1DModel):
Examples
--------
.. plot::
:include-source:
Expand Down Expand Up @@ -464,7 +462,6 @@ class NFW(Fittable1DModel):
Notes
-----
Model formula:
.. math:: \rho(r)=\frac{\delta_c\rho_{c}}{r/r_s(1+r/r_s)^2}
Expand Down Expand Up @@ -651,7 +648,6 @@ def A_NFW(y):
Notes
-----
Model formula:
.. math:: A_{NFW} = [\ln(1+y) - \frac{y}{1+y}]
Expand Down Expand Up @@ -753,7 +749,6 @@ def circular_velocity(self, r):
Notes
-----
Model formula:
.. math:: v_{circ}(r)^2 = \frac{1}{x}\frac{\ln(1+cx)-(cx)/(1+cx)}{\ln(1+c)-c/(1+c)}
Expand Down
9 changes: 0 additions & 9 deletions astropy/modeling/polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ class OrthoPolynomialBase(PolynomialBase):
Parameters
----------
x_degree : int
degree in x
y_degree : int
Expand Down Expand Up @@ -483,7 +482,6 @@ class Chebyshev1D(_PolyDomainWindow1D):
Notes
-----
This model does not support the use of units/quantities, because each term
in the sum of Chebyshev polynomials is a polynomial in x - since the
coefficients within each Chebyshev polynomial are fixed, we can't use
Expand Down Expand Up @@ -605,7 +603,6 @@ class Hermite1D(_PolyDomainWindow1D):
Notes
-----
This model does not support the use of units/quantities, because each term
in the sum of Hermite polynomials is a polynomial in x - since the
coefficients within each Hermite polynomial are fixed, we can't use
Expand Down Expand Up @@ -715,7 +712,6 @@ class Hermite2D(OrthoPolynomialBase):
Parameters
----------
x_degree : int
degree in x
y_degree : int
Expand All @@ -737,7 +733,6 @@ class Hermite2D(OrthoPolynomialBase):
Notes
-----
This model does not support the use of units/quantities, because each term
in the sum of Hermite polynomials is a polynomial in x and/or y - since the
coefficients within each Hermite polynomial are fixed, we can't use
Expand Down Expand Up @@ -878,7 +873,6 @@ class Legendre1D(_PolyDomainWindow1D):
Notes
-----
This model does not support the use of units/quantities, because each term
in the sum of Legendre polynomials is a polynomial in x - since the
coefficients within each Legendre polynomial are fixed, we can't use
Expand Down Expand Up @@ -1371,7 +1365,6 @@ class Chebyshev2D(OrthoPolynomialBase):
Parameters
----------
x_degree : int
degree in x
y_degree : int
Expand All @@ -1394,7 +1387,6 @@ class Chebyshev2D(OrthoPolynomialBase):
Notes
-----
This model does not support the use of units/quantities, because each term
in the sum of Chebyshev polynomials is a polynomial in x and/or y - since
the coefficients within each Chebyshev polynomial are fixed, we can't use
Expand Down Expand Up @@ -1521,7 +1513,6 @@ class Legendre2D(OrthoPolynomialBase):
Parameters
----------
x_degree : int
degree in x
y_degree : int
Expand Down
2 changes: 0 additions & 2 deletions astropy/modeling/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class AliasDict(MutableMapping):
Examples
--------
>>> parent = {'a': 1, 'b': 2, 'c': 3}
>>> aliases = {'foo': 'a', 'bar': 'c'}
>>> alias_dict = AliasDict(parent, aliases)
Expand Down Expand Up @@ -169,7 +168,6 @@ def make_binary_operator_eval(oper, f, g):
Example
-------
>>> from operator import add
>>> def prod(x, y):
... return (x * y,)
Expand Down

0 comments on commit bfb192d

Please sign in to comment.