Commit 90ca73fd authored by Jérome Perrin's avatar Jérome Perrin

fix pylint warnings

note that:
 - _version is a generated/vendored file, so we just disable all
 - ssl.OP_NO_TLSv1 and OP_NO_TLSv1_1 are not detected by pylint, so we add
   a local ignore
parent 7f6bdd71
Pipeline #25907 running with stage
in 0 seconds
# pylint: disable-all
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
......
......@@ -19,7 +19,6 @@
# See https://www.nexedi.com/licensing for rationale and options.
from cryptography import x509
from cryptography.hazmat.primitives.serialization import Encoding
from threading import local
from wsgiref.simple_server import make_server
import caucase.exceptions
......@@ -170,7 +169,7 @@ class SQLite3Storage(local):
return bool(result)
def reserveId(self):
for trynum in range(10):
for _ in range(10):
reserved_id = ''.join(
random.choice(
string.ascii_lowercase + string.digits) for _ in range(32))
......@@ -490,7 +489,7 @@ def getSSLContext(server_key_path, ca_certificate_path, crl_path):
# ssl_context.verify_flags = ssl.VERIFY_CRL_CHECK_LEAF
# ssl_context.load_verify_locations(cafile=crl_path)
ssl_context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1
ssl_context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 # pylint:disable=no-member
ssl_context.verify_mode = ssl.CERT_OPTIONAL
ssl_context.load_verify_locations(cafile=ca_certificate_path)
ssl_context.load_cert_chain(server_key_path)
......
......@@ -31,7 +31,6 @@ import requests
import requests.exceptions
import shutil
import signal
import sys
import tarfile
import tempfile
import time
......@@ -328,9 +327,9 @@ ez+ONyvetfvjD8cxyQ==
self.kedifa_runtime.start()
self.assertTrue(self.kedifa_runtime.is_alive())
# give 5s for KeDiFa to be available
# give KeDiFa some time to be available
b = time.time()
for i in range(100):
for _ in range(100):
try:
self.requests_get(self.kedifa_url + 'ping')
except BaseException:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment