Skip to content

Commit

Permalink
improve type hint and docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ziw-liu committed Oct 10, 2024
1 parent dfb9fa7 commit 76b66be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions viscy/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def subcommands() -> dict[str, set[str]]:
subcommands["export"] = {"model", "dataloaders", "datamodule"}
return subcommands

def add_arguments_to_parser(self, parser):
def add_arguments_to_parser(self, parser) -> None:
parser.set_defaults(
{
"trainer.logger": lazy_instance(
Expand All @@ -40,16 +40,17 @@ def run_cli(
model_class: type[LightningModule],
datamodule_class: type[LightningDataModule],
trainer_class: type[VisCyTrainer],
):
) -> None:
"""
Main Lightning CLI entry point.
Parse log level and set TF32 precision.
Parameters
----------
cli_class : type[LightningCLI]
Lightning CLI class
model_class : type[LightningModule]
Lightning module class
Lightning module class. Not used in preprocess mode.
datamodule_class : type[LightningDataModule]
Lightning datamodule class
trainer_class : type[VisCyTrainer]
Expand Down
2 changes: 1 addition & 1 deletion viscy/translation/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class TranslationCLI(VisCyCLI):
"""Extending lightning CLI arguments and defualts."""

def add_arguments_to_parser(self, parser):
def add_arguments_to_parser(self, parser) -> None:
super().add_arguments_to_parser(parser)
if "preprocess" not in sys.argv:
parser.link_arguments("data.yx_patch_size", "model.example_input_yx_shape")
Expand Down

0 comments on commit 76b66be

Please sign in to comment.