diff --git a/pyproject.toml b/pyproject.toml index d8bc5968..1a379845 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ ignore = [ "PTH123", # TODO: Switch to pathlib "B019", # TODO: Use of 'functools.lru_cache' or 'functools.cache' on methods can lead to memory leaks "S101", # TODO: Use of 'assert' detected - "S311", # TODO: Standard pseudo-random generators are not suitable for cryptographic purposes + ] diff --git a/vaccine/vaccine_reg_ussd.py b/vaccine/vaccine_reg_ussd.py index d0a56ef4..f6a193dd 100644 --- a/vaccine/vaccine_reg_ussd.py +++ b/vaccine/vaccine_reg_ussd.py @@ -85,7 +85,7 @@ class ID_TYPES(Enum): async def state_age_gate(self): self.user.answers = {} - if random.random() < config.THROTTLE_PERCENTAGE / 100.0: + if random.random() < config.THROTTLE_PERCENTAGE / 100.0: # noqa: S311 - Not being used for crypto return await self.go_to_state("state_throttle") return MenuState( diff --git a/vaccine/vaccine_reg_whatsapp.py b/vaccine/vaccine_reg_whatsapp.py index 9702262d..ae65a98d 100644 --- a/vaccine/vaccine_reg_whatsapp.py +++ b/vaccine/vaccine_reg_whatsapp.py @@ -121,7 +121,7 @@ async def state_exit(self): async def state_language(self): self.user.answers = {} - if random.random() < config.THROTTLE_PERCENTAGE / 100.0: + if random.random() < config.THROTTLE_PERCENTAGE / 100.0: # noqa: S311 - Not being used for crypto return await self.go_to_state("state_throttle") return LanguageState( diff --git a/yal/utils.py b/yal/utils.py index abf36721..80ab5a79 100644 --- a/yal/utils.py +++ b/yal/utils.py @@ -51,7 +51,7 @@ def get_generic_error(): - return random.choice(GENERIC_ERRORS) + return random.choice(GENERIC_ERRORS) # noqa: S311 - Not being used for crypto def get_today(): @@ -153,7 +153,7 @@ def is_integer(string: str) -> bool: def get_generic_error_options(): - return random.choice(GENERIC_ERROR_OPTIONS) + return random.choice(GENERIC_ERROR_OPTIONS) # noqa: S311 - Not being used for crypto async def check_if_baseline_active():