Skip to content

Commit f9d50bf

Browse files
authored
fix: fixing lint issues
1 parent 67ce2b0 commit f9d50bf

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from . import access
1+
from . import access # noqa

Access/access_modules/base_email_access/access.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from django.shortcuts import render, redirect
2-
import json
1+
from django.shortcuts import render
32
import logging
43
import traceback
54

@@ -9,6 +8,7 @@
98

109
logger = logging.getLogger(__name__)
1110

11+
1212
# Use this base module when the access requires only sending a mail
1313
# to multiple dedicated emails
1414
# for super to work in python 2
@@ -24,9 +24,11 @@ def revoke_owner(self):
2424

2525
# Override in module for specific person who should mark access as revoked
2626
def access_mark_revoke_permission(self, access_type):
27+
# TODO: define ACCESS_REVOKE_PERMISSIONS_MAPPING
2728
return ACCESS_REVOKE_PERMISSIONS_MAPPING["security"]
2829

29-
# module's tag() method should return a tag present in hash returned by access_types() "type" key
30+
# module's tag() method should return a tag present in
31+
# hash returned by access_types() "type" key
3032
def get_label_desc(self, access_label):
3133
data = next(
3234
(
@@ -154,6 +156,7 @@ def approve(
154156
logger.error(
155157
"Could not send email for error %s", str(traceback.format_exc())
156158
)
159+
logger.error(e)
157160
return False, str(traceback.format_exc())
158161

159162
def revoke(self, user, label):

bootprocess/admin.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
MembershipV2,
1111
)
1212

13+
admin.site.register(User)
1314
admin.site.register(Permission)
1415
admin.site.register(UserAccessMapping)
1516
admin.site.register(Role)

bootprocess/views_helper.py

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def getDashboardData(request):
7979
ec2_regions = list(data.keys())
8080

8181
context = {}
82-
dataList = []
8382

8483
gitCount = 0
8584
dashboardCount = 0

scripts/clone_access_modules.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
Repo(folder_path).remotes.origin.pull()
1717
else:
1818
Repo.clone_from(url, folder_path)
19-
# move all folders, not files in the cloned repo to the access_modules folder except the .git, .github and secrets folder
19+
# move all folders, not files in the cloned repo to the access_modules
20+
# folder except the .git, .github and secrets folder
2021
for file in os.listdir(folder_path):
2122
if (
2223
os.path.isdir(folder_path + "/" + file)
@@ -28,8 +29,10 @@
2829
folder_path + "/" + file, "./Access/access_modules/" + file
2930
)
3031

31-
# remove the cloned repo folder entirely with all its contents which includes folders and files using shutil.rmtree()
32-
# shutil.rmtree() sometimes throws an error on windows, so we use try and except to ignore the error
32+
# remove the cloned repo folder entirely with all its contents which
33+
# includes folders and files using shutil.rmtree()
34+
# shutil.rmtree() sometimes throws an error on windows,
35+
# so we use try and except to ignore the error
3336
try:
3437
shutil.rmtree(folder_path)
3538
except Exception as e:

0 commit comments

Comments
 (0)