Commit Graph

5 Commits

Author SHA1 Message Date
lhinds 2d2170273b Project Migration to PyCQA
This change rehomes the project to PyCQA[1] as reported to the
openstack-dev mailing list [1]

[0] https://github.com/PyCQA/bandit
[1] http://lists.openstack.org/pipermail/openstack-dev/2018-April/129386.html

Change-Id: I6aad329a60799ea24a3d9bc49e35c3c35ed9dc3b
2018-05-04 06:59:50 +02:00
Eric Brown 584c45247d Fix pylint too-many-return-statements errors
This patch fixes the errors noted by pylint whereby too many
return statements are within a single method/function.

The following errors were resolved:
************* Module bandit.core.context
R:196, 4: Too many return statements (10/6) (too-many-return-statements)

Change-Id: I1caf37effb94c4d8123f99d3bb485e1fa0af8272
2016-12-15 16:53:17 -08:00
Eric Brown 8dc5384835 Fix pylint old-style-class errors
This patch fixes the errors noted by pylint where
classes are defined in an older style (old-style-class).

The following errors were resolved:

************* Module bandit.core.config
C: 30, 0: Old-style class defined. (old-style-class)
************* Module bandit.core.context
C: 24, 0: Old-style class defined. (old-style-class)
************* Module bandit.core.manager
C: 37, 0: Old-style class defined. (old-style-class)
************* Module bandit.core.meta_ast
C: 25, 0: Old-style class defined. (old-style-class)
************* Module bandit.core.test_set
C: 30, 0: Old-style class defined. (old-style-class)
C: 77, 8: Old-style class defined. (old-style-class)
************* Module bandit.core.tester
C: 29, 0: Old-style class defined. (old-style-class)

Change-Id: I48728844fd259c1e08bad5e4aa6f65352fdd0ff2
2016-11-29 22:32:02 -08:00
Eric Brown 06681f0e98 Fix for pylint no-self-use error
Pylint reports the following after re-enabling R0201.

************* Module bandit.core.config
R:174, 4: Method could be a function (no-self-use)
************* Module bandit.core.metrics
R: 84, 4: Method could be a function (no-self-use)
************* Module bandit.core.test_set
R: 41, 4: Method could be a function (no-self-use)
************* Module bandit.core.tester
R: 95, 4: Method could be a function (no-self-use)

Change-Id: Ie27fabe517259c3896ee2b302ab7e40aaacc71ab
2016-11-28 12:37:15 -08:00
Eric Brown 3be3ca4de0 Trivial fixes based on pylint scan
* Constants should be in caps
* Redundant ( ) in if statements
* Use isinstance instead of type ==
* Indentation

Change-Id: I79fda14112a9dd02fe867f6d850762216e0ca9a1
2016-11-21 13:16:32 -08:00