Skip to content

Commit 2fdc088

Browse files
effigiesBen Cipollini
authored andcommitted
STY: PEP8 and import cleanup
Brings branch into better alignment with 0ce347f
1 parent ad0225e commit 2fdc088

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

nibabel/gifti/gifti.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ def data_tag(dataarray, encoding, datatype, ordering):
191191
class DataTag(xml.XmlSerializable):
192192
def __init__(self, *args):
193193
self.args = args
194+
194195
def _to_xml_element(self):
195196
return _data_tag_element(*self.args)
196197

@@ -518,7 +519,6 @@ def print_summary(self):
518519
print(da.print_summary())
519520
print('----end----')
520521

521-
522522
def _to_xml_element(self):
523523
GIFTI = xml.Element('GIFTI', attrib={
524524
'Version': self.version,
@@ -550,7 +550,8 @@ def from_file_map(klass, file_map):
550550
Returns a GiftiImage
551551
"""
552552
from .parse_gifti_fast import parse_gifti_file
553-
return parse_gifti_file(fptr=file_map['image'].get_prepare_fileobj('rb'))
553+
return parse_gifti_file(
554+
fptr=file_map['image'].get_prepare_fileobj('rb'))
554555

555556
def to_file_map(self, file_map=None):
556557
""" Save the current image to the specified file_map
@@ -565,8 +566,8 @@ def to_file_map(self, file_map=None):
565566
566567
Notes
567568
-----
568-
We write all files with utf-8 encoding, and specify this at the top of the
569-
XML file with the ``encoding`` attribute.
569+
We write all files with utf-8 encoding, and specify this at the top of
570+
the XML file with the ``encoding`` attribute.
570571
571572
The Gifti spec suggests using the following suffixes to your
572573
filename when saving each specific type of data:

nibabel/gifti/tests/test_parse_gifti_fast.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@
1414

1515
import numpy as np
1616

17-
from ... import gifti as gi
18-
from ...loadsave import load, save
19-
20-
from ..util import gifti_endian_codes
21-
from ...nifti1 import xform_codes
22-
23-
from ...tmpdirs import InTemporaryDirectory
17+
import nibabel.gifti as gi
18+
from nibabel.gifti.util import gifti_endian_codes
19+
from nibabel.loadsave import load, save
20+
from nibabel.nifti1 import xform_codes
21+
from nibabel.tmpdirs import InTemporaryDirectory
2422

2523
from numpy.testing import assert_array_equal, assert_array_almost_equal
2624

0 commit comments

Comments
 (0)