diff --git a/docs/source/transforms.rst b/docs/source/transforms.rst index 8bd5bfd99f..a359821679 100644 --- a/docs/source/transforms.rst +++ b/docs/source/transforms.rst @@ -667,6 +667,12 @@ Post-processing :members: :special-members: __call__ +`Invert` +""""""""" +.. autoclass:: Invert + :members: + :special-members: __call__ + Regularization ^^^^^^^^^^^^^^ diff --git a/pyproject.toml b/pyproject.toml index 50d0b09672..53ca608d20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,6 @@ exclude = "monai/bundle/__main__.py" [tool.ruff] line-length = 133 -lint.ignore-init-module-imports = true lint.ignore = ["F401", "E741"] [tool.pytype] diff --git a/tests/test_pad_collation.py b/tests/test_pad_collation.py index 17f49611df..9d5012c9a3 100644 --- a/tests/test_pad_collation.py +++ b/tests/test_pad_collation.py @@ -89,7 +89,7 @@ def tearDown(self) -> None: @parameterized.expand(TESTS) def test_pad_collation(self, t_type, collate_method, transform): - if t_type == dict: + if t_type is dict: dataset = CacheDataset(self.dict_data, transform, progress=False) else: dataset = _Dataset(self.list_data, self.list_labels, transform) @@ -104,7 +104,7 @@ def test_pad_collation(self, t_type, collate_method, transform): loader = DataLoader(dataset, batch_size=10, collate_fn=collate_method) # check collation in forward direction for data in loader: - if t_type == dict: + if t_type is dict: shapes = [] decollated_data = decollate_batch(data) for d in decollated_data: @@ -113,7 +113,7 @@ def test_pad_collation(self, t_type, collate_method, transform): self.assertTrue(len(output["image"].applied_operations), len(dataset.transform.transforms)) self.assertTrue(len(set(shapes)) > 1) # inverted shapes must be different because of random xforms - if t_type == dict: + if t_type is dict: batch_inverse = BatchInverseTransform(dataset.transform, loader) for data in loader: output = batch_inverse(data)