diff --git a/pyproject.toml b/pyproject.toml index e6d08411b0f35..6357632a8cd64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,6 @@ ignore = [ ] "src/**" = [ "S101", # todo: Use of `assert` detected - "S105", "S106", "S107", # todo: Possible hardcoded password: ... "S113", # todo: Probable use of requests call without timeout "S301", # todo: `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue "S324", # todo: Probable use of insecure hash functions in `hashlib` @@ -106,7 +105,6 @@ ignore = [ ] "tests/**" = [ "S101", # Use of `assert` detected - "S105", "S106", # todo: Possible hardcoded password: ... "S301", # `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue "S113", # todo: Probable use of requests call without timeout "S311", # todo: Standard pseudo-random generators are not suitable for cryptographic purposes diff --git a/src/lightning/pytorch/callbacks/lr_monitor.py b/src/lightning/pytorch/callbacks/lr_monitor.py index 36241b9e678e5..37ecb620bf6d4 100644 --- a/src/lightning/pytorch/callbacks/lr_monitor.py +++ b/src/lightning/pytorch/callbacks/lr_monitor.py @@ -241,7 +241,7 @@ def _extract_lr(self, param_group: dict[str, Any], name: str) -> dict[str, Any]: self.lrs[name].append(lr) return {name: lr} - def _remap_keys(self, names: list[list[str]], token: str = "/pg1") -> None: + def _remap_keys(self, names: list[list[str]], token: str = "/pg1") -> None: # noqa: S107 """This function is used the remap the keys if param groups for a given optimizer increased.""" for group_new_names in names: for new_name in group_new_names: diff --git a/src/lightning/pytorch/profilers/profiler.py b/src/lightning/pytorch/profilers/profiler.py index a09b703e606b8..e8a8c60881062 100644 --- a/src/lightning/pytorch/profilers/profiler.py +++ b/src/lightning/pytorch/profilers/profiler.py @@ -77,7 +77,10 @@ def _rank_zero_info(self, *args: Any, **kwargs: Any) -> None: log.info(*args, **kwargs) def _prepare_filename( - self, action_name: Optional[str] = None, extension: str = ".txt", split_token: str = "-" + self, + action_name: Optional[str] = None, + extension: str = ".txt", + split_token: str = "-", # noqa: S107 ) -> str: args = [] if self._stage is not None: