Skip to content

Commit ab0078f

Browse files
lordkyzrBrad Porter
and
Brad Porter
committed
Updated pylint to 2.13.0 to address security issue (#159)
* Updated pylint to 2.13.0 to address security issue * Updated linting rules as well as changed a couple linting errors to better match the defaults from PyLint * Updated version and changelog Co-authored-by: Brad Porter <[email protected]>
1 parent 6e11603 commit ab0078f

File tree

8 files changed

+228
-197
lines changed

8 files changed

+228
-197
lines changed

.pylintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[MASTER]
2-
disable=useless-object-inheritance
2+
disable=useless-object-inheritance,consider-using-f-string

CHANGES.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
CHANGELOG for LaunchKey Python SDK
22
==================================
33

4+
4.0.1
5+
-----
6+
* Updated dependencies and fixed security issue for PyLint in dev dependencies
7+
48
4.0.0
59
-----
610

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mock = ">= 2.0.0, < 3.0.0"
1414
ddt = ">= 1.1.1, < 2.0.0"
1515
# Tools for static analysis
1616
flake8 = "~=3.8.3"
17-
pylint = "~=2.7.0"
17+
pylint = "~=2.13.0"
1818
coverage = "~=4.5.2"
1919
# Tools for multi-environment testing before sending to CI
2020
tox = "~=3.8.0"

Pipfile.lock

+217-192
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

launchkey/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""LaunchKey Service SDK module"""
2-
SDK_VERSION = '4.0.0'
2+
SDK_VERSION = '4.0.1'
33
LAUNCHKEY_PRODUCTION = "https://api.launchkey.com"
44
VALID_JWT_ISSUER_LIST = ["svc", "dir", "org"]
55
JOSE_SUPPORTED_JWE_ALGS = ['RSA-OAEP']

launchkey/clients/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ def update_service(self, service_id, name=False, description=False,
264264
self._transport.patch(self.__service_base_path, self._subject,
265265
**kwargs)
266266

267+
# pylint: disable = duplicate-code
267268
@api_call
268269
def add_service_public_key(self, service_id, public_key, expires=None,
269270
active=None, key_type=None):
@@ -523,7 +524,7 @@ def __geofence_to_geo_circle(geofence):
523524

524525
@staticmethod
525526
def __generate_fence_objects_from_policy(policy):
526-
fences = list()
527+
fences = []
527528
for fence in policy["fences"]:
528529
if fence["type"] == "GEO_CIRCLE":
529530
fences.append(

launchkey/clients/organization.py

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def get_directory_public_keys(self, directory_id):
135135
self._subject,
136136
directory_id=str(directory_id)).data]
137137

138+
# pylint: disable = duplicate-code
138139
@api_call
139140
def add_directory_public_key(self, directory_id, public_key, expires=None,
140141
active=None, key_type=None):

launchkey/transports/jose_auth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def decrypt_response(self, response):
486486
:return: Decrypted string
487487
"""
488488
package = JWEnc().unpack(response)
489-
keys = list()
489+
keys = []
490490
if 'kid' in package.headers:
491491
for key in self.issuer_private_keys:
492492
if key.kid == package.headers['kid']:

0 commit comments

Comments
 (0)