Skip to content

Commit a883890

Browse files
matsumotosantchatonBordaSkafteNickideependujha
authored
Remove S105, S106, S107 ignores (Lightning-AI#21196)
* ignore * forgot testts * Empty-Commit * Empty-Commit * Empty-Commit --------- Co-authored-by: thomas chaton <[email protected]> Co-authored-by: Jirka B <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Nicki Skafte Detlefsen <[email protected]> Co-authored-by: jirka <[email protected]> Co-authored-by: Deependu <[email protected]>
1 parent 41c49a7 commit a883890

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ ignore = [
9191
]
9292
"src/**" = [
9393
"S101", # todo: Use of `assert` detected
94-
"S105", "S106", "S107", # todo: Possible hardcoded password: ...
9594
"S113", # todo: Probable use of requests call without timeout
9695
"S301", # todo: `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
9796
"S324", # todo: Probable use of insecure hash functions in `hashlib`
@@ -106,7 +105,6 @@ ignore = [
106105
]
107106
"tests/**" = [
108107
"S101", # Use of `assert` detected
109-
"S105", "S106", # todo: Possible hardcoded password: ...
110108
"S301", # `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
111109
"S113", # todo: Probable use of requests call without timeout
112110
"S311", # todo: Standard pseudo-random generators are not suitable for cryptographic purposes

src/lightning/pytorch/callbacks/lr_monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def _extract_lr(self, param_group: dict[str, Any], name: str) -> dict[str, Any]:
241241
self.lrs[name].append(lr)
242242
return {name: lr}
243243

244-
def _remap_keys(self, names: list[list[str]], token: str = "/pg1") -> None:
244+
def _remap_keys(self, names: list[list[str]], token: str = "/pg1") -> None: # noqa: S107
245245
"""This function is used the remap the keys if param groups for a given optimizer increased."""
246246
for group_new_names in names:
247247
for new_name in group_new_names:

src/lightning/pytorch/profilers/profiler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ def _rank_zero_info(self, *args: Any, **kwargs: Any) -> None:
7777
log.info(*args, **kwargs)
7878

7979
def _prepare_filename(
80-
self, action_name: Optional[str] = None, extension: str = ".txt", split_token: str = "-"
80+
self,
81+
action_name: Optional[str] = None,
82+
extension: str = ".txt",
83+
split_token: str = "-", # noqa: S107
8184
) -> str:
8285
args = []
8386
if self._stage is not None:

0 commit comments

Comments
 (0)