nshutils 0.17.0__tar.gz → 0.18.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nshutils-0.17.0 → nshutils-0.18.0}/PKG-INFO +1 -1
- {nshutils-0.17.0 → nshutils-0.18.0}/pyproject.toml +5 -1
- {nshutils-0.17.0 → nshutils-0.18.0}/src/nshutils/__init__.py +2 -0
- {nshutils-0.17.0 → nshutils-0.18.0}/src/nshutils/_display.py +2 -0
- {nshutils-0.17.0 → nshutils-0.18.0}/src/nshutils/actsave/__init__.py +2 -0
- {nshutils-0.17.0 → nshutils-0.18.0}/src/nshutils/actsave/_loader.py +2 -0
- {nshutils-0.17.0 → nshutils-0.18.0}/src/nshutils/actsave/_saver.py +2 -0
- {nshutils-0.17.0 → nshutils-0.18.0}/src/nshutils/collections.py +2 -0
- {nshutils-0.17.0 → nshutils-0.18.0}/src/nshutils/logging.py +7 -5
- {nshutils-0.17.0 → nshutils-0.18.0}/src/nshutils/snoop.py +2 -0
- {nshutils-0.17.0 → nshutils-0.18.0}/src/nshutils/typecheck.py +2 -0
- {nshutils-0.17.0 → nshutils-0.18.0}/README.md +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "nshutils"
|
3
|
-
version = "0.
|
3
|
+
version = "0.18.0"
|
4
4
|
description = ""
|
5
5
|
authors = ["Nima Shoghi <nimashoghi@gmail.com>"]
|
6
6
|
readme = "README.md"
|
@@ -40,7 +40,11 @@ strictSetInference = true
|
|
40
40
|
reportPrivateImportUsage = false
|
41
41
|
|
42
42
|
[tool.ruff.lint]
|
43
|
+
select = ["FA102", "FA100"]
|
43
44
|
ignore = ["F722", "F821", "E731", "E741"]
|
44
45
|
|
46
|
+
[tool.ruff.lint.isort]
|
47
|
+
required-imports = ["from __future__ import annotations"]
|
48
|
+
|
45
49
|
[tool.poetry.extras]
|
46
50
|
extra = ["pysnooper", "lovely-numpy", "lovely-tensors", "rich", "treescope"]
|
@@ -2,6 +2,8 @@
|
|
2
2
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
3
|
# http://www.apache.org/licenses/LICENSE-2.0
|
4
4
|
#
|
5
|
+
from __future__ import annotations
|
6
|
+
|
5
7
|
import dataclasses
|
6
8
|
from collections import OrderedDict, defaultdict
|
7
9
|
from collections.abc import Callable, Mapping, Sequence
|
@@ -1,3 +1,5 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
1
3
|
import logging
|
2
4
|
from pathlib import Path
|
3
5
|
|
@@ -7,7 +9,7 @@ def init_python_logging(
|
|
7
9
|
lovely_tensors: bool = False,
|
8
10
|
lovely_numpy: bool = False,
|
9
11
|
treescope: bool = False,
|
10
|
-
treescope_autovisualize_arrays: bool =
|
12
|
+
treescope_autovisualize_arrays: bool = False,
|
11
13
|
rich: bool = False,
|
12
14
|
rich_tracebacks: bool = False,
|
13
15
|
log_level: int | str | None = logging.INFO,
|
@@ -81,8 +83,8 @@ def pretty(
|
|
81
83
|
*,
|
82
84
|
lovely_tensors: bool = True,
|
83
85
|
lovely_numpy: bool = True,
|
84
|
-
treescope: bool =
|
85
|
-
treescope_autovisualize_arrays: bool =
|
86
|
+
treescope: bool = False,
|
87
|
+
treescope_autovisualize_arrays: bool = False,
|
86
88
|
log_level: int | str | None = logging.INFO,
|
87
89
|
log_save_dir: Path | None = None,
|
88
90
|
rich_log_handler: bool = False,
|
@@ -104,8 +106,8 @@ def lovely(
|
|
104
106
|
*,
|
105
107
|
lovely_tensors: bool = True,
|
106
108
|
lovely_numpy: bool = True,
|
107
|
-
treescope: bool =
|
108
|
-
treescope_autovisualize_arrays: bool =
|
109
|
+
treescope: bool = False,
|
110
|
+
treescope_autovisualize_arrays: bool = False,
|
109
111
|
log_level: int | str | None = logging.INFO,
|
110
112
|
log_save_dir: Path | None = None,
|
111
113
|
rich_log_handler: bool = False,
|
File without changes
|