Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixes for bugs found by pylint#795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bnavigator merged 5 commits intopython-control:mainfromroryyorke:rory/pylint-fixes
Nov 20, 2022

Conversation

roryyorke
Copy link
Contributor

I found these withpylint.

See also rory/pylint for two pylint-specific commits if you want to run this yourself; I usedpylint -E control to run pylint, with-E disabling all but the most serious of warnings.

On rory/pylint, pylint still reports all of these as errors; some are false positives (e.g., "invalid-unary-operand-type"), and others are stylistic (e.g., "self as first argument"), but I haven't investigated every single one.

We could consider incorporating pylint, but we'd obviously have to do more work configuring it.

pylint -E control************* Module control.iosyscontrol/iosys.py:153:4: E0213: Method should have "self" as first argument (no-self-argument)control/iosys.py:203:4: E0213: Method should have "self" as first argument (no-self-argument)control/iosys.py:222:4: E0213: Method should have "self" as first argument (no-self-argument)control/iosys.py:260:4: E0213: Method should have "self" as first argument (no-self-argument)control/iosys.py:279:4: E0213: Method should have "self" as first argument (no-self-argument)control/iosys.py:317:4: E0213: Method should have "self" as first argument (no-self-argument)control/iosys.py:336:4: E0213: Method should have "self" as first argument (no-self-argument)control/iosys.py:809:4: E0213: Method should have "self" as first argument (no-self-argument)************* Module control.mateqncontrol/mateqn.py:182:51: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type)control/mateqn.py:185:31: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type)************* Module control.sisotoolcontrol/sisotool.py:305:22: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type)control/sisotool.py:305:22: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type)************* Module control.passivitycontrol/passivity.py:150:24: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/passivity.py:150:24: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/passivity.py:150:24: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/passivity.py:152:24: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/passivity.py:152:24: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/passivity.py:152:24: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/passivity.py:154:24: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/passivity.py:154:24: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/passivity.py:154:24: E1130: bad operand type for unary -: list (invalid-unary-operand-type)************* Module control.descfcncontrol/descfcn.py:388:58: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type)************* Module control.statefbkcontrol/statefbk.py:768:27: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type)************* Module control.freqplotcontrol/freqplot.py:1043:27: E1130: bad operand type for unary -: MaskedArray (invalid-unary-operand-type)control/freqplot.py:1046:20: E1130: bad operand type for unary -: MaskedArray (invalid-unary-operand-type)************* Module control.lticontrol/lti.py:119:16: E1101: Instance of 'LTI' has no 'poles' member; maybe 'pole'? (no-member)control/lti.py:188:19: E1101: Instance of 'LTI' has no '__call__' member (no-member)control/lti.py:198:19: E1102: self is not callable (not-callable)control/lti.py:217:15: E1101: Instance of 'LTI' has no 'poles' member; maybe 'pole'? (no-member)control/lti.py:222:15: E1101: Instance of 'LTI' has no 'zeros' member; maybe 'zero'? (no-member)************* Module control.optimalcontrol/optimal.py:307:40: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:324:49: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:329:39: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:428:50: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:430:37: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:441:46: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:443:33: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:513:50: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:515:37: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:526:46: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/optimal.py:528:33: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)************* Module control.exceptioncontrol/exception.py:94:12: E0401: Unable to import 'cvxopt' (import-error)************* Module control.tests.matlab_testcontrol/tests/matlab_test.py:366:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/matlab_test.py:367:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/matlab_test.py:368:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)************* Module control.tests.xferfcn_testcontrol/tests/xferfcn_test.py:448:39: E1101: Instance of 'TransferFunction' has no 'evalfr' member (no-member)************* Module control.tests.iosys_testcontrol/tests/iosys_test.py:533:52: E1130: bad operand type for unary -: tuple (invalid-unary-operand-type)control/tests/iosys_test.py:1796:35: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)************* Module control.tests.optimal_testcontrol/tests/optimal_test.py:174:8: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/tests/optimal_test.py:619:12: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/tests/optimal_test.py:620:12: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/tests/optimal_test.py:621:11: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)************* Module control.tests.matlab2_testcontrol/tests/matlab2_test.py:142:16: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/tests/matlab2_test.py:172:16: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/tests/matlab2_test.py:267:8: E1101: Instance of 'TestControlMatlab' has no 'assertRaises' member (no-member)control/tests/matlab2_test.py:272:8: E1101: Instance of 'TestControlMatlab' has no 'assertRaises' member (no-member)control/tests/matlab2_test.py:325:8: E1101: Instance of 'TestControlMatlab' has no 'assertRaises' member (no-member)control/tests/matlab2_test.py:325:38: E1123: Unexpected keyword argument 'x0' in function call (unexpected-keyword-arg)control/tests/matlab2_test.py:330:8: E1101: Instance of 'TestControlMatlab' has no 'assertRaises' member (no-member)control/tests/matlab2_test.py:330:37: E1123: Unexpected keyword argument 'x0' in function call (unexpected-keyword-arg)control/tests/matlab2_test.py:333:8: E1101: Instance of 'TestControlMatlab' has no 'assertRaises' member (no-member)control/tests/matlab2_test.py:333:38: E1123: Unexpected keyword argument 'x0' in function call (unexpected-keyword-arg)control/tests/matlab2_test.py:335:8: E1101: Instance of 'TestControlMatlab' has no 'assertRaises' member (no-member)control/tests/matlab2_test.py:335:38: E1123: Unexpected keyword argument 'x0' in function call (unexpected-keyword-arg)************* Module control.tests.robust_testcontrol/tests/robust_test.py:86:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:88:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:105:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:122:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:143:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:149:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:173:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:174:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:175:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:176:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:288:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:289:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:290:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)control/tests/robust_test.py:291:31: E1130: bad operand type for unary -: list (invalid-unary-operand-type)************* Module control.tests.timeresp_testcontrol/tests/timeresp_test.py:355:38: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:355:48: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:356:38: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:356:51: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:421:36: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/tests/timeresp_test.py:521:45: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)control/tests/timeresp_test.py:923:19: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:924:19: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:924:36: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:926:19: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:926:33: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:976:15: E1101: Instance of 'tuple' has no 'ndim' member (no-member)control/tests/timeresp_test.py:977:15: E1101: Instance of 'tuple' has no 'ndim' member (no-member)control/tests/timeresp_test.py:978:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:978:26: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1022:23: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1024:23: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1035:23: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1037:23: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1047:19: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1057:19: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1076:19: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1093:19: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1098:19: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1142:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1167:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1168:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1169:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1174:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1175:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)control/tests/timeresp_test.py:1176:15: E1101: Instance of 'tuple' has no 'shape' member (no-member)************* Module control.tests.input_element_int_testcontrol/tests/input_element_int_test.py:66:40: E1101: Instance of 'finfo' has no 'epsneg' member (no-member)************* Module control.flatsys.flatsyscontrol/flatsys/flatsys.py:174:4: E0202: An attribute defined in control.flatsys.flatsys line 163 hides this method (method-hidden)control/flatsys/flatsys.py:203:4: E0202: An attribute defined in control.flatsys.flatsys line 164 hides this method (method-hidden)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 94.84% when pullingf591c08 on roryyorke:rory/pylint-fixes into2dc409b on python-control:main.

@bnavigatorbnavigator merged commit2746ce1 intopython-control:mainNov 20, 2022
@murrayrmmurrayrm added this to the0.9.3 milestoneDec 24, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@murrayrmmurrayrmmurrayrm left review comments

@bnavigatorbnavigatorbnavigator left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.9.3
Development

Successfully merging this pull request may close these issues.

4 participants
@roryyorke@coveralls@murrayrm@bnavigator

[8]ページ先頭

©2009-2025 Movatter.jp