Skip to content

Commit be7ea9f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e5f9b4e commit be7ea9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchinfo/model_statistics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, Union
3+
from typing import TYPE_CHECKING, Any
44

55
from .enums import Units
66
from .formatting import CONVERSION_FACTORS, FormattingOptions
@@ -112,7 +112,7 @@ def to_megabytes(num: int) -> float:
112112
return num / 1e6
113113

114114
@staticmethod
115-
def to_readable(num: Union[int, float], units: Units = Units.AUTO) -> tuple[Units, float]:
115+
def to_readable(num: float, units: Units = Units.AUTO) -> tuple[Units, float]:
116116
"""Converts a number to millions, billions, or trillions."""
117117
if units == Units.AUTO:
118118
if num >= 1e12:

0 commit comments

Comments
 (0)