Skip to content

Commit

Permalink
fix precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexriedel1 committed Jun 21, 2023
1 parent de24110 commit 8797b19
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ repos:
# packages in a different order than the rest of the codebase.
args: ["--ignore=I001"]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
- id: prettier
#- repo: https://github.com/pre-commit/mirrors-prettier
# rev: v3.0.0-alpha.4
# hooks:
# - id: prettier

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.33.0
hooks:
- id: markdownlint
#- repo: https://github.com/igorshubovych/markdownlint-cli
# rev: v0.33.0
# hooks:
# - id: markdownlint

- repo: https://github.com/AleksaC/hadolint-py
rev: v2.12.0.2
Expand Down
8 changes: 4 additions & 4 deletions src/anomalib/data/utils/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def get_transforms(
logger.info("Loading transforms from config File")
transforms_list = []

if "Resize" not in config.keys():
resize_height, resize_width = get_image_height_and_width(image_size)
transforms_list.append(A.Resize(height=resize_height, width=resize_width, always_apply=True))
logger.info(f"Resize {resize_height, resize_width} added!")
if "Resize" not in config.keys() and image_size is not None:
resize_height, resize_width = get_image_height_and_width(image_size)
transforms_list.append(A.Resize(height=resize_height, width=resize_width, always_apply=True))
logger.info(f"Resize {resize_height, resize_width} added!")

for key, value in config.items():
if hasattr(A, key):
Expand Down

0 comments on commit 8797b19

Please sign in to comment.