Skip to content

Commit ddab546

Browse files
larsonereffigies
authored andcommitted
BUG: More escapes
1 parent 3084407 commit ddab546

File tree

10 files changed

+16
-15
lines changed

10 files changed

+16
-15
lines changed

nibabel/arraywriters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ScalingError(WriterError):
5050
class ArrayWriter(object):
5151

5252
def __init__(self, array, out_dtype=None, **kwargs):
53-
""" Initialize array writer
53+
r""" Initialize array writer
5454
5555
Parameters
5656
----------
@@ -247,7 +247,7 @@ class SlopeArrayWriter(ArrayWriter):
247247

248248
def __init__(self, array, out_dtype=None, calc_scale=True,
249249
scaler_dtype=np.float32, **kwargs):
250-
""" Initialize array writer
250+
r""" Initialize array writer
251251
252252
Parameters
253253
----------
@@ -478,7 +478,7 @@ class SlopeInterArrayWriter(SlopeArrayWriter):
478478

479479
def __init__(self, array, out_dtype=None, calc_scale=True,
480480
scaler_dtype=np.float32, **kwargs):
481-
""" Initialize array writer
481+
r""" Initialize array writer
482482
483483
Parameters
484484
----------
@@ -751,7 +751,7 @@ def get_slope_inter(writer):
751751

752752
def make_array_writer(data, out_type, has_slope=True, has_intercept=True,
753753
**kwargs):
754-
""" Make array writer instance for array `data` and output type `out_type`
754+
r""" Make array writer instance for array `data` and output type `out_type`
755755
756756
Parameters
757757
----------

nibabel/brikhead.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ class AFNIHeaderError(HeaderDataError):
8585

8686

8787
DATA_OFFSET = 0
88-
TYPE_RE = re.compile('type\s*=\s*(string|integer|float)-attribute\s*\n')
89-
NAME_RE = re.compile('name\s*=\s*(\w+)\s*\n')
88+
TYPE_RE = re.compile(r'type\s*=\s*(string|integer|float)-attribute\s*\n')
89+
NAME_RE = re.compile(r'name\s*=\s*(\w+)\s*\n')
9090

9191

9292
def _unpack_var(var):

nibabel/deprecator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import warnings
66
import re
77

8-
_LEADING_WHITE = re.compile('^(\s*)')
8+
_LEADING_WHITE = re.compile(r'^(\s*)')
99

1010

1111
class ExpiredDeprecationError(RuntimeError):

nibabel/externals/netcdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ def _read_att_values(self):
779779
values = self.fp.read(int(count))
780780
self.fp.read(-count % 4) # read padding
781781

782-
if typecode is not 'c':
782+
if typecode != 'c':
783783
values = frombuffer(values, dtype='>%s' % typecode).copy()
784784
if values.shape == (1,):
785785
values = values[0]

nibabel/fileholders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def file_like(self):
9999

100100

101101
def copy_file_map(file_map):
102-
''' Copy mapping of fileholders given by `file_map`
102+
r''' Copy mapping of fileholders given by `file_map`
103103
104104
Parameters
105105
----------

nibabel/funcs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def squeeze_image(img):
8888

8989

9090
def concat_images(images, check_affines=True, axis=None):
91-
''' Concatenate images in list to single image, along specified dimension
91+
r''' Concatenate images in list to single image, along specified dimension
9292
9393
Parameters
9494
----------
@@ -102,6 +102,7 @@ def concat_images(images, check_affines=True, axis=None):
102102
be the same shape. If not None, concatenates on the specified
103103
dimension. This requires all images to be the same shape, except on
104104
the specified dimension.
105+
105106
Returns
106107
-------
107108
concat_img : ``SpatialImage``

nibabel/loadsave.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
def load(filename, **kwargs):
25-
''' Load file given filename, guessing at file type
25+
r''' Load file given filename, guessing at file type
2626
2727
Parameters
2828
----------

nibabel/openers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _gzip_open(filename, mode='rb', compresslevel=9, keep_open=False):
111111

112112

113113
class Opener(object):
114-
r"""Class to accept, maybe open, and context-manage file-likes / filenames
114+
r""" Class to accept, maybe open, and context-manage file-likes / filenames
115115
116116
Provides context manager to close files that the constructor opened for
117117
you.

nibabel/streamlines/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def load(fileobj, lazy_load=False):
9797

9898

9999
def save(tractogram, filename, **kwargs):
100-
""" Saves a tractogram to a file.
100+
r""" Saves a tractogram to a file.
101101
102102
Parameters
103103
----------

nibabel/streamlines/tractogram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def is_lazy_dict(obj):
2525

2626

2727
class SliceableDataDict(MutableMapping):
28-
""" Dictionary for which key access can do slicing on the values.
28+
r""" Dictionary for which key access can do slicing on the values.
2929
3030
This container behaves like a standard dictionary but extends key access to
3131
allow keys for key access to be indices slicing into the contained ndarray
@@ -78,7 +78,7 @@ def __len__(self):
7878

7979

8080
class PerArrayDict(SliceableDataDict):
81-
""" Dictionary for which key access can do slicing on the values.
81+
r""" Dictionary for which key access can do slicing on the values.
8282
8383
This container behaves like a standard dictionary but extends key access to
8484
allow keys for key access to be indices slicing into the contained ndarray

0 commit comments

Comments
 (0)