1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-09-17 18:31:15 +00:00

Remove nosec comments

This commit is contained in:
Mo 2023-11-03 21:21:50 +01:00
parent 570e4e121e
commit fcfd282e79
2 changed files with 6 additions and 6 deletions

View file

@ -201,7 +201,7 @@ def _generate_test_db():
roles=[assistantRole], roles=[assistantRole],
first_name=name[0], first_name=name[0],
last_name=name[1], last_name=name[1],
mobile_phone_number="01" + "".join(str(randint(0, 9)) for i in range(10)), # nosec: B311 mobile_phone_number="01" + "".join(str(randint(0, 9)) for i in range(10)),
active_semester=ws, active_semester=ws,
) )
@ -219,16 +219,16 @@ def _generate_test_db():
special = False special = False
semester = semester_experiment.semester semester = semester_experiment.semester
if semester.label == "SS": if semester.label == "SS":
month = randint(3, 8) # nosec: B311 month = randint(3, 8)
if month <= 4: if month <= 4:
special = True special = True
else: else:
month = randint(9, 12) # nosec: B311 month = randint(9, 12)
if month <= 10: if month <= 10:
special = True special = True
year = 2000 + semester.year year = 2000 + semester.year
day = randint(1, 28) # nosec: B311 day = randint(1, 28)
for appointment_date in (date(year, month, day), date(year, month, day + 1)): for appointment_date in (date(year, month, day), date(year, month, day + 1)):
db_add( db_add(
Appointment( Appointment(

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import subprocess # nosec 404 import subprocess
import click import click
@ -13,7 +13,7 @@ from cli.test.generate_test_db.main import _generate_test_db
class Manage: class Manage:
@staticmethod @staticmethod
def run(command: str, **kwargs): def run(command: str, **kwargs):
return subprocess.run(command, shell=True, check=False, **kwargs) # nosec B602 return subprocess.run(command, shell=True, check=False, **kwargs)
@staticmethod @staticmethod
def box(message: str): def box(message: str):