Skip to content

Commit

Permalink
Merge pull request astropy#14843 from nstarman/ruff-fix-isort
Browse files Browse the repository at this point in the history
Ruff fix isort
  • Loading branch information
nstarman committed May 18, 2023
2 parents 12b01d7 + 8be8179 commit 80f5a71
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 28 deletions.
45 changes: 23 additions & 22 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ ignore = [
"G001", # logging-string-format
"G004", # logging-f-string

# isort (I)
"I001", # TODO!

# flake8-import-conventions (ICN) : use conventional import aliases
"ICN001", # import-conventions

Expand Down Expand Up @@ -288,22 +285,26 @@ unfixable = [
# When a general exclusion is being fixed, but it affects many subpackages, it
# is better to fix for subpackages individually. The general exclusion should be
# copied to these subpackage sections and fixed there.
"astropy/config" = []
"astropy/constants" = []
"astropy/convolution" = []
"astropy/coordinates" = []
"astropy/cosmology" = []
"astropy/io" = []
"astropy/modeling" = []
"astropy/nddata" = []
"astropy/samp" = []
"astropy/stats" = []
"astropy/table" = []
"astropy/tests" = []
"astropy/time" = []
"astropy/timeseries" = []
"astropy/uncertainty" = []
"astropy/units" = []
"astropy/utils" = []
"astropy/visualization" = []
"astropy/wcs" = []
"astropy/__init__.py" = []
"astropy/config/*" = []
"astropy/constants/*" = []
"astropy/convolution/*" = ["I001"]
"astropy/coordinates/*" = ["I001"]
"astropy/cosmology/*" = []
"astropy/io/*" = ["I001"]
"astropy/logger.py" = []
"astropy/modeling/*" = ["I001"]
"astropy/nddata/*" = ["I001"]
"astropy/samp/*" = []
"astropy/stats/*" = ["I001"]
"astropy/table/*" = ["I001"]
"astropy/tests/*" = []
"astropy/time/*" = ["I001"]
"astropy/timeseries/*" = ["I001"]
"astropy/units/*" = ["I001"]
"astropy/uncertainty/*" = []
"astropy/utils/*" = []
"astropy/visualization/*" = ["I001"]
"astropy/wcs/*" = ["I001"]
"docs/*" = []
"examples/coordinates/*" = []
5 changes: 4 additions & 1 deletion astropy/cosmology/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

from . import core, flrw, funcs, parameter, units, utils

from . import io # needed before 'realizations' # isort: split
# isort: split
from . import io # needed before 'realizations'

# isort: split
from . import realizations
from .core import *
from .flrw import *
Expand Down
1 change: 0 additions & 1 deletion astropy/cosmology/flrw/tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import pytest


##############################################################################
# TESTS
##############################################################################
Expand Down
2 changes: 1 addition & 1 deletion astropy/cosmology/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"""

# Import to register with the I/O machinery
from . import cosmology, ecsv, html, mapping, model, row, table, yaml, latex
from . import cosmology, ecsv, html, latex, mapping, model, row, table, yaml
1 change: 0 additions & 1 deletion astropy/cosmology/io/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from astropy.cosmology.parameter import Parameter
from astropy.table import QTable


from .table import to_table

_FORMAT_TABLE = {
Expand Down
2 changes: 1 addition & 1 deletion astropy/cosmology/tests/test_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
test_ecsv,
test_html,
test_json,
test_latex,
test_mapping,
test_model,
test_row,
test_table,
test_yaml,
test_latex,
)
from astropy.table import QTable, Row
from astropy.utils.compat.optional_deps import HAS_BS4
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ ignore = [
[tool.ruff.isort]
known-third-party = ["erfa", "PyYAML", "packaging", "pytest", "scipy", "matplotlib"]
known-first-party = ["astropy", "extension_helpers"]
force-sort-within-sections = true
force-sort-within-sections = false

[tool.ruff.pydocstyle]
convention = "numpy"
Expand Down

0 comments on commit 80f5a71

Please sign in to comment.