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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nshutils
3
- Version: 0.17.0
3
+ Version: 0.18.0
4
4
  Summary:
5
5
  Author: Nima Shoghi
6
6
  Author-email: nimashoghi@gmail.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "nshutils"
3
- version = "0.17.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"]
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  from . import actsave as actsave
2
4
  from . import typecheck as typecheck
3
5
  from ._display import display as display
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import importlib.util
2
4
  from functools import cache
3
5
  from typing import Any
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  from ._loader import ActLoad as ActLoad
2
4
  from ._saver import Activation as Activation
3
5
  from ._saver import ActSave as ActSave
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import pprint
2
4
  from dataclasses import dataclass, field
3
5
  from functools import cached_property
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import contextlib
2
4
  import fnmatch
3
5
  import tempfile
@@ -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 = True,
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 = True,
85
- treescope_autovisualize_arrays: bool = True,
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 = True,
108
- treescope_autovisualize_arrays: bool = True,
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,
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import contextlib
2
4
  import importlib.metadata
3
5
  from typing import Any, Protocol, cast
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import os
2
4
  from collections.abc import Sequence
3
5
  from logging import getLogger
File without changes