Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
8aadef5f
Unverified
Commit
8aadef5f
authored
Mar 11, 2022
by
vfdev
Committed by
GitHub
Mar 11, 2022
Browse files
Try to fix lint/mypy failed CI (#5598)
Co-authored-by:
Vasilis Vryniotis
<
datumbox@users.noreply.github.com
>
parent
8f61f4ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchvision/prototype/transforms/functional/_geometry.py
torchvision/prototype/transforms/functional/_geometry.py
+2
-2
No files found.
torchvision/prototype/transforms/functional/_geometry.py
View file @
8aadef5f
...
@@ -318,9 +318,9 @@ def resized_crop_image_pil(
...
@@ -318,9 +318,9 @@ def resized_crop_image_pil(
def
_parse_five_crop_size
(
size
:
List
[
int
])
->
List
[
int
]:
def
_parse_five_crop_size
(
size
:
List
[
int
])
->
List
[
int
]:
if
isinstance
(
size
,
numbers
.
Number
):
if
isinstance
(
size
,
numbers
.
Number
):
size
=
(
int
(
size
),
int
(
size
)
)
size
=
[
int
(
size
),
int
(
size
)
]
elif
isinstance
(
size
,
(
tuple
,
list
))
and
len
(
size
)
==
1
:
elif
isinstance
(
size
,
(
tuple
,
list
))
and
len
(
size
)
==
1
:
size
=
(
size
[
0
],
size
[
0
]
)
# type: ignore[assignment
]
size
=
[
size
[
0
],
size
[
0
]]
if
len
(
size
)
!=
2
:
if
len
(
size
)
!=
2
:
raise
ValueError
(
"Please provide only two dimensions (h, w) for size."
)
raise
ValueError
(
"Please provide only two dimensions (h, w) for size."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment