Skip to content

Commit b054b86

Browse files
committed
sort import, line length at 119 characters, fix others flake8 errors
1 parent 747461d commit b054b86

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

bvh.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ def tokenize(self):
5555
for char in self.data:
5656
if char not in ('\n', '\r'):
5757
accumulator += char
58-
else:
59-
if accumulator:
58+
elif accumulator:
6059
first_round.append(re.split('\\s+', accumulator.strip()))
6160
accumulator = ''
6261
node_stack = [self.root]

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
author='20Tab S.r.l.',
99
author_email='info@20tab.com',
1010
url='https://github.com/20tab/bvh-python',
11-
py_modules=['bvh'])
11+
py_modules=['bvh'],
12+
)

tests/test_bvh.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import unittest
2+
23
from bvh import Bvh, BvhNode
34

45

@@ -16,12 +17,16 @@ def test_empty_root(self):
1617
def test_tree(self):
1718
with open('tests/test_freebvh.bvh') as f:
1819
mocap = Bvh(f.read())
19-
self.assertEqual([str(item) for item in mocap.root], ['HIERARCHY', 'ROOT mixamorig:Hips', 'MOTION', 'Frames: 69', 'Frame Time: 0.0333333'])
20+
self.assertEqual([str(item) for item in mocap.root],
21+
['HIERARCHY', 'ROOT mixamorig:Hips', 'MOTION', 'Frames: 69', 'Frame Time: 0.0333333']
22+
)
2023

2124
def test_tree2(self):
2225
with open('tests/test_mocapbank.bvh') as f:
2326
mocap = Bvh(f.read())
24-
self.assertEqual([str(item) for item in mocap.root], ['HIERARCHY', 'ROOT Hips', 'MOTION', 'Frames: 455', 'Frame Time: 0.033333'])
27+
self.assertEqual([str(item) for item in mocap.root],
28+
['HIERARCHY', 'ROOT Hips', 'MOTION', 'Frames: 455', 'Frame Time: 0.033333']
29+
)
2530

2631
def test_filter(self):
2732
with open('tests/test_freebvh.bvh') as f:
@@ -109,7 +114,9 @@ def test_channels(self):
109114
with open('tests/test_mocapbank.bvh') as f:
110115
mocap = Bvh(f.read())
111116
self.assertEqual(mocap.joint_channels('LeftElbow'), ['Zrotation', 'Xrotation', 'Yrotation'])
112-
self.assertEqual(mocap.joint_channels('Hips'), ['Xposition', 'Yposition', 'Zposition', 'Zrotation', 'Xrotation', 'Yrotation'])
117+
self.assertEqual(mocap.joint_channels('Hips'),
118+
['Xposition', 'Yposition', 'Zposition', 'Zrotation', 'Xrotation', 'Yrotation']
119+
)
113120

114121
def test_frame_channel(self):
115122
with open('tests/test_mocapbank.bvh') as f:

0 commit comments

Comments
 (0)