Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c2f763

Browse files
committed
Merge pull request #4104 from tacaswell/pep8_fixes
Pep8 fixes
2 parents 08b8adb + 0bb6453 commit 0c2f763

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

examples/animation/double_pendulum_animated.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ def derivs(state, t):
2121

2222
del_ = state[2] - state[0]
2323
den1 = (M1 + M2)*L1 - M2*L1*cos(del_)*cos(del_)
24-
dydx[1] = (M2*L1*state[1]*state[1]*sin(del_)*cos(del_)
25-
+ M2*G*sin(state[2])*cos(del_)
26-
+ M2*L2*state[3]*state[3]*sin(del_)
27-
- (M1 + M2)*G*sin(state[0]))/den1
24+
dydx[1] = (M2*L1*state[1]*state[1]*sin(del_)*cos(del_) +
25+
M2*G*sin(state[2])*cos(del_) +
26+
M2*L2*state[3]*state[3]*sin(del_) -
27+
(M1 + M2)*G*sin(state[0]))/den1
2828

2929
dydx[2] = state[3]
3030

3131
den2 = (L2/L1)*den1
32-
dydx[3] = (-M2*L2*state[3]*state[3]*sin(del_)*cos(del_)
33-
+ (M1 + M2)*G*sin(state[0])*cos(del_)
34-
- (M1 + M2)*L1*state[1]*state[1]*sin(del_)
35-
- (M1 + M2)*G*sin(state[2]))/den2
32+
dydx[3] = (-M2*L2*state[3]*state[3]*sin(del_)*cos(del_) +
33+
(M1 + M2)*G*sin(state[0])*cos(del_) -
34+
(M1 + M2)*L1*state[1]*state[1]*sin(del_) -
35+
(M1 + M2)*G*sin(state[2]))/den2
3636

3737
return dydx
3838

lib/matplotlib/tests/test_coding_standards.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
'E129',
3434
'E131',
3535
'E265',
36-
'E266']
36+
'E266',
37+
'W503']
3738

3839
EXTRA_EXCLUDE_FILE = os.path.join(os.path.dirname(__file__),
3940
'.pep8_test_exclude.txt')

0 commit comments

Comments
 (0)