Title: Fixes for bugs found by pylint by roryyorke · Pull Request #795 · python-control/python-control · GitHub
Open Graph Title: Fixes for bugs found by pylint by roryyorke · Pull Request #795 · python-control/python-control
X Title: Fixes for bugs found by pylint by roryyorke · Pull Request #795 · python-control/python-control
Description: I found these with pylint. See also rory/pylint for two pylint-specific commits if you want to run this yourself; I used pylint -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.iosys control/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.mateqn control/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.sisotool control/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.passivity 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: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.descfcn control/descfcn.py:388:58: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type) ************* Module control.statefbk control/statefbk.py:768:27: E1130: bad operand type for unary -: NoneType (invalid-unary-operand-type) ************* Module control.freqplot control/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.lti control/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.optimal control/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.exception control/exception.py:94:12: E0401: Unable to import 'cvxopt' (import-error) ************* Module control.tests.matlab_test control/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_test control/tests/xferfcn_test.py:448:39: E1101: Instance of 'TransferFunction' has no 'evalfr' member (no-member) ************* Module control.tests.iosys_test control/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_test control/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_test control/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_test control/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_test control/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_test control/tests/input_element_int_test.py:66:40: E1101: Instance of 'finfo' has no 'epsneg' member (no-member) ************* Module control.flatsys.flatsys control/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)
Open Graph Description: I found these with pylint. See also rory/pylint for two pylint-specific commits if you want to run this yourself; I used pylint -E control to run pylint, with -E disabling all but the most serious ...
X Description: I found these with pylint. See also rory/pylint for two pylint-specific commits if you want to run this yourself; I used pylint -E control to run pylint, with -E disabling all but the most serious ...
Opengraph URL: https://github.com/python-control/python-control/pull/795
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4355909c-3b8f-e804-40eb-824daecb1404 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 94B0:243963:1D6CE1F:29EAD1C:697A53D3 |
| html-safe-nonce | 4c5893c588e8ebb4eb6b9fa291f28b2fa0e8a3499c9947887b0e4ee6c862e4b5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEIwOjI0Mzk2MzoxRDZDRTFGOjI5RUFEMUM6Njk3QTUzRDMiLCJ2aXNpdG9yX2lkIjoiMjE5NTM3NTEwNzgwNTQzNDgzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 96c3aae007725a56a48fae2c85952f5b5ec362063209284479489604cae46992 |
| hovercard-subject-tag | pull_request:1129049271 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/795/files |
| twitter:image | https://avatars.githubusercontent.com/u/110974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/110974?s=400&v=4 |
| og:image:alt | I found these with pylint. See also rory/pylint for two pylint-specific commits if you want to run this yourself; I used pylint -E control to run pylint, with -E disabling all but the most serious ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6675d94efd2a33cdba9e6e611f931ac7eaa988d8fef14b7a663cc012c4501b42 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ca995a95b56cf8bd27cc89fcea65d2ad787f53c1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width