Complete the cleanup of the lint-basic run #2194
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
tox -e lint-basic # || exit 1
|
tox -e lint-basic || exit 1
|
||||||
tox
|
tox
|
||||||
|
|
|
@ -40,7 +40,8 @@ def generate_hash(string):
|
||||||
try:
|
try:
|
||||||
# make input case insensitive
|
# make input case insensitive
|
||||||
string = str.lower(string)
|
string = str.lower(string)
|
||||||
hash_object = hashlib.md5(str.encode(string)) # nosec B324, B303
|
hash_object = hashlib.md5( # nosec B324, B303
|
||||||
|
str.encode(string))
|
||||||
print(hash_object.hexdigest())
|
print(hash_object.hexdigest())
|
||||||
# returned object is a hex string
|
# returned object is a hex string
|
||||||
return hash_object.hexdigest()
|
return hash_object.hexdigest()
|
||||||
|
|
|
@ -85,7 +85,7 @@ def pickle_deserialize_old_knownnodes(source):
|
||||||
the new format is {Peer:{"lastseen":i, "rating":f}}
|
the new format is {Peer:{"lastseen":i, "rating":f}}
|
||||||
"""
|
"""
|
||||||
global knownNodes
|
global knownNodes
|
||||||
knownNodes = pickle.load(source)
|
knownNodes = pickle.load(source) # nosec B301
|
||||||
for stream in knownNodes.keys():
|
for stream in knownNodes.keys():
|
||||||
for node, params in knownNodes[stream].iteritems():
|
for node, params in knownNodes[stream].iteritems():
|
||||||
if isinstance(params, (float, int)):
|
if isinstance(params, (float, int)):
|
||||||
|
|
|
@ -276,8 +276,8 @@ def buildCPoW():
|
||||||
'-f', 'Makefile.bsd']) # nosec B607, B603
|
'-f', 'Makefile.bsd']) # nosec B607, B603
|
||||||
else:
|
else:
|
||||||
# GNU make
|
# GNU make
|
||||||
call(["make", "-C", os.path.join(paths.codePath(),
|
call([ # nosec B607, B603
|
||||||
"bitmsghash")]) # nosec B607, B603
|
"make", "-C", os.path.join(paths.codePath(), "bitmsghash")])
|
||||||
if os.path.exists(os.path.join(paths.codePath(), "bitmsghash", "bitmsghash.so")):
|
if os.path.exists(os.path.join(paths.codePath(), "bitmsghash", "bitmsghash.so")):
|
||||||
init()
|
init()
|
||||||
notifyBuild(True)
|
notifyBuild(True)
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -21,7 +21,7 @@ deps =
|
||||||
bandit
|
bandit
|
||||||
flake8
|
flake8
|
||||||
commands =
|
commands =
|
||||||
bandit -r --exit-zero -s B105,B301,B411,B413,B608,B101 \
|
bandit -r -s B101,B411,B413,B608 \
|
||||||
-x checkdeps.*,bitmessagecurses,bitmessageqt,tests pybitmessage
|
-x checkdeps.*,bitmessagecurses,bitmessageqt,tests pybitmessage
|
||||||
flake8 pybitmessage --count --select=E9,F63,F7,F82 \
|
flake8 pybitmessage --count --select=E9,F63,F7,F82 \
|
||||||
--show-source --statistics
|
--show-source --statistics
|
||||||
|
|
Reference in New Issue
Block a user