Skip to content

Commit 0b842b9

Browse files
nnineptotaj
andauthored
Fix mypy errors attributed to pytorch_lightning/profilers/advanced.py (#13792)
Co-authored-by: otaj <[email protected]>
1 parent 4588a79 commit 0b842b9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ module = [
5959
"pytorch_lightning.demos.mnist_datamodule",
6060
"pytorch_lightning.loggers.comet",
6161
"pytorch_lightning.loggers.neptune",
62-
"pytorch_lightning.profilers.advanced",
6362
"pytorch_lightning.profilers.base",
6463
"pytorch_lightning.profilers.pytorch",
6564
"pytorch_lightning.profilers.simple",

src/pytorch_lightning/profilers/advanced.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import logging
1818
import pstats
1919
from pathlib import Path
20-
from typing import Dict, Optional, Union
20+
from typing import Dict, Optional, Tuple, Union
2121

2222
from pytorch_lightning.profilers.profiler import Profiler
2323

@@ -82,7 +82,7 @@ def teardown(self, stage: Optional[str] = None) -> None:
8282
super().teardown(stage=stage)
8383
self.profiled_actions = {}
8484

85-
def __reduce__(self):
85+
def __reduce__(self) -> Tuple:
8686
# avoids `TypeError: cannot pickle 'cProfile.Profile' object`
8787
return (
8888
self.__class__,

0 commit comments

Comments
 (0)