Skip to content

Commit d937bbd

Browse files
[pre-commit.ci] pre-commit autoupdate (#336)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.4 → v0.8.0](astral-sh/ruff-pre-commit@v0.7.4...v0.8.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3f8e998 commit d937bbd

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ci:
22
skip: [mypy, pytest]
33
repos:
44
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: v0.7.4
5+
rev: v0.8.0
66
hooks:
77
- id: ruff
88
args: [--fix]

torchinfo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
from .torchinfo import summary
44

55
__all__ = (
6-
"summary",
76
"ColumnSettings",
87
"Mode",
98
"ModelStatistics",
109
"RowSettings",
1110
"Units",
1211
"Verbosity",
12+
"summary",
1313
)
1414
__version__ = "1.8.0"

torchinfo/formatting.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,8 @@ def layers_to_str(self, summary_list: list[LayerInfo], total_params: int) -> str
135135
"""
136136
new_str = ""
137137
for layer_info in summary_list:
138-
if (
139-
layer_info.depth > self.max_depth
140-
or self.hide_recursive_layers
141-
and layer_info.is_recursive
138+
if layer_info.depth > self.max_depth or (
139+
self.hide_recursive_layers and layer_info.is_recursive
142140
):
143141
continue
144142

0 commit comments

Comments
 (0)