Skip to content

Commit

Permalink
fix D411 - BlankLineBeforeSection
Browse files Browse the repository at this point in the history
`ruff` will guard against violations from now on.

This PR includes manual fixes for the decorator examples.

Signed-off-by: Nathaniel Starkman (@nstarman) <nstarkman@protonmail.com>
  • Loading branch information
nstarman committed Jan 31, 2023
1 parent bfb192d commit eccdccf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion astropy/io/fits/_tiled_compression/tiled_compression.py
Expand Up @@ -255,7 +255,6 @@ def decompress_hdu(hdu):
Returns
-------
data : `numpy.ndarray`
The decompressed data array.
"""
Expand Down
2 changes: 2 additions & 0 deletions astropy/modeling/fitting.py
Expand Up @@ -388,6 +388,7 @@ class LinearLSQFitter(metaclass=_FitterMeta):
Uses `numpy.linalg.lstsq` to do the fitting.
Given a model and data, fits the model to the data and changes the
model's parameters. Keeps a dictionary of auxiliary fitting information.
Notes
-----
Note that currently LinearLSQFitter does not support compound models.
Expand Down Expand Up @@ -925,6 +926,7 @@ def __call__(self, model, x, y, z=None, weights=None, **kwargs):
Weights to be passed to the fitter.
kwargs : dict, optional
Keyword arguments to be passed to the fitter.
Returns
-------
fitted_model : `~astropy.modeling.FittableModel`
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Expand Up @@ -148,7 +148,6 @@ extend-ignore = [
"D404", # NoThisPrefix
"D410", # BlankLineAfterSection. Using D412 instead.
"D400", # EndsInPeriod. Using D415 instead.
"D411", # BlankLineBeforeSection # TODO: autofix
"D413", # BlankLineAfterLastSection. Don't check.
"D414", # NonEmptySection # TODO: fix
"D416", # SectionNameEndsInColon. Don't check.
Expand Down Expand Up @@ -278,7 +277,10 @@ exclude= [
"astropy/io/registry/compat.py" = ["F822"]
"astropy/modeling/models.py" = ["F401", "F403", "F405"]
"astropy/units/format/*.py" = ["D415"] # The docstrings are regexes.
"astropy/utils/decorators.py" = ["D214", "D215"] # keep Examples section indented.
"astropy/utils/decorators.py" = [
"D214", "D215", # keep Examples section indented.
"D411", # sphinx treats spaced example sections as real sections
]
"test_*.py" = ["B011", "D", "E402", "PGH001", "S101"]
"examples/*.py" = [
"D415", # EndsInPeriod. The examples use RST syntax, not a one-line title.
Expand Down

0 comments on commit eccdccf

Please sign in to comment.