Typing: LightningModule casted to double turns into nn.Module
🐛 Bug
import pytorch_lightning as pl


class PLModule(pl.LightningModule):
    pass


module = PLModule().double()
trainer = pl.Trainer()
trainer.fit(module)
You will get a typing warning on the last line in PyCharm:
Expected type 'LightningModule', got 'Module' instead 
Expected behavior
No typing warnings
Environment
PyCharm 2020.3
pytorch-lightning 1.1.1