Skip to content

Commit

Permalink
Fix the import order errors from flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
FanwangM committed Nov 6, 2024
1 parent a2f6385 commit 7c5bef1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bfit/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from timeit import default_timer as timer

import numpy as np
from scipy.optimize import NonlinearConstraint, minimize
from scipy.optimize import minimize, NonlinearConstraint

from bfit.measure import KLDivergence, Measure, SquaredDifference

Expand Down
2 changes: 1 addition & 1 deletion bfit/greedy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import numpy as np
from scipy.optimize import nnls

from bfit.fit import KLDivergenceFPI, ScipyFit, _BaseFit
from bfit.fit import _BaseFit, KLDivergenceFPI, ScipyFit
from bfit.measure import SquaredDifference
from bfit.model import AtomicGaussianDensity

Expand Down
4 changes: 2 additions & 2 deletions bfit/test/test_greedy.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
import numpy.testing as npt

from bfit.greedy import (
GreedyKLFPI,
GreedyLeastSquares,
get_next_choices,
get_two_next_choices,
GreedyKLFPI,
GreedyLeastSquares,
pick_two_lose_one,
remove_redundancies,
)
Expand Down
2 changes: 1 addition & 1 deletion bfit/test/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import numpy as np
from numpy.testing import assert_almost_equal, assert_raises

from bfit.grid import ClenshawRadialGrid, CubicGrid, UniformRadialGrid, _BaseRadialGrid
from bfit.grid import _BaseRadialGrid, ClenshawRadialGrid, CubicGrid, UniformRadialGrid


def test_raises_base():
Expand Down
9 changes: 0 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,6 @@ line-length = 100
# )
# '''

[tool.isort]
profile = "black"
# known_first_party = ["bfit"]
# If you need to exclude files from having their imports sorted
#extend_skip_glob = [
# "bfit/somefile.py",
# "bfit/somedir/*",
#]

# https://beta.ruff.rs/docs
[tool.ruff]
line-length = 100
Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ exclude =
.eggs,

max-line-length = 100
; import-order-style = google
import-order-style = smarkets
application-import-names = bfit
extend-ignore =
# E121 : continuation line under-indented for hanging indent
Expand Down Expand Up @@ -193,7 +195,3 @@ source =
.tox/*/lib/python*/site-packages/bfit
.tox/pypy*/site-packages/bfit

[isort]
profile = black
known_first_party = bfit
line_length = 100

0 comments on commit 7c5bef1

Please sign in to comment.