Skip to content

Commit

Permalink
Minor edits for PEP-8, move attributes to second input to create a gr…
Browse files Browse the repository at this point in the history
…idgen object in Gridgen.from_spec()
  • Loading branch information
ricaenriquez committed Nov 14, 2018
1 parent faf6864 commit 4717e43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pygridgen/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ def to_spec(self):
def from_spec(cls, attributes):
focus_spec = attributes.pop('focus', None)
focus = Focus.from_spec(focus_spec)
return cls(**attributes, focus=focus)
return cls(focus=focus, **attributes)


def rho_to_vert(xr, yr, pm, pn, ang): # pragma: no cover
Expand Down
2 changes: 1 addition & 1 deletion pygridgen/tests/test_focus.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_full_focus_called(full_focus, xy):

nptest.assert_array_almost_equal(xf, known_focused_x, decimal=3)
nptest.assert_array_almost_equal(yf, known_focused_y, decimal=3)


def test_focus_to_from_spec():
fpx = pygridgen.grid._FocusPoint(0.25, 'x', 4, 0.5)
Expand Down

0 comments on commit 4717e43

Please sign in to comment.