Skip to content

Commit 3c32e9f

Browse files
committed
Upgrade Python syntax with pyupgrade --py3-plus
1 parent dcb138e commit 3c32e9f

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

sfs/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ArrayData(namedtuple('ArrayData', 'x n a')):
3838

3939
def __repr__(self):
4040
return 'ArrayData(\n' + ',\n'.join(
41-
' {0}={1}'.format(name, repr(data).replace('\n', '\n '))
41+
' {}={}'.format(name, repr(data).replace('\n', '\n '))
4242
for name, data in zip('xna', self)) + ')'
4343

4444
def take(self, indices):

sfs/mono/drivingfunction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _wfs_point(omega, x0, n0, xs, c=None):
5151

5252

5353
def wfs_25d_point(omega, x0, n0, xs, xref=[0, 0, 0], c=None, omalias=None):
54-
"""Point source by 2.5-dimensional WFS.
54+
r"""Point source by 2.5-dimensional WFS.
5555
5656
::
5757
@@ -96,7 +96,7 @@ def _wfs_plane(omega, x0, n0, n=[0, 1, 0], c=None):
9696

9797
def wfs_25d_plane(omega, x0, n0, n=[0, 1, 0], xref=[0, 0, 0], c=None,
9898
omalias=None):
99-
"""Plane wave by 2.5-dimensional WFS.
99+
r"""Plane wave by 2.5-dimensional WFS.
100100
101101
::
102102
@@ -140,7 +140,7 @@ def _wfs_focused(omega, x0, n0, xs, c=None):
140140

141141

142142
def wfs_25d_focused(omega, x0, n0, xs, xref=[0, 0, 0], c=None, omalias=None):
143-
"""Focused source by 2.5-dimensional WFS.
143+
r"""Focused source by 2.5-dimensional WFS.
144144
145145
::
146146

sfs/mono/source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def point_averaged_intensity(omega, x0, n0, grid, c=None):
165165

166166

167167
def point_dipole(omega, x0, n0, grid, c=None):
168-
"""Point source with dipole characteristics.
168+
r"""Point source with dipole characteristics.
169169
170170
Parameters
171171
----------

sfs/plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def vectors(v, grid, cmap='blacktransparent', headlength=3, headaxislength=2.5,
394394

395395

396396
def add_colorbar(im, aspect=20, pad=0.5, **kwargs):
397-
"""Add a vertical color bar to a plot.
397+
r"""Add a vertical color bar to a plot.
398398
399399
Parameters
400400
----------

sfs/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def __getitem__(self, index):
431431

432432
def __repr__(self):
433433
return 'XyzComponents(\n' + ',\n'.join(
434-
' {0}={1}'.format(name, repr(data).replace('\n', '\n '))
434+
' {}={}'.format(name, repr(data).replace('\n', '\n '))
435435
for name, data in zip('xyz', self)) + ')'
436436

437437
def make_property(index, doc):

0 commit comments

Comments
 (0)