stdl 0.7.1__tar.gz → 0.8.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.
- {stdl-0.7.1 → stdl-0.8.0}/PKG-INFO +31 -53
- {stdl-0.7.1 → stdl-0.8.0}/README.md +1 -1
- stdl-0.8.0/pyproject.toml +300 -0
- stdl-0.7.1/pyproject.toml → stdl-0.8.0/pyproject.toml.orig +65 -46
- stdl-0.8.0/stdl/__init__.py +39 -0
- stdl-0.8.0/stdl/__init__.pyi +27 -0
- {stdl-0.7.1 → stdl-0.8.0}/stdl/color.py +82 -15
- {stdl-0.7.1 → stdl-0.8.0}/stdl/decorators.py +3 -0
- {stdl-0.7.1 → stdl-0.8.0}/stdl/dt.py +20 -1
- {stdl-0.7.1 → stdl-0.8.0}/stdl/fs.py +221 -102
- {stdl-0.7.1 → stdl-0.8.0}/stdl/import_lazy.py +28 -18
- {stdl-0.7.1 → stdl-0.8.0}/stdl/log.py +4 -0
- {stdl-0.7.1 → stdl-0.8.0}/stdl/lst.py +6 -0
- {stdl-0.7.1 → stdl-0.8.0}/stdl/net.py +3 -0
- {stdl-0.7.1 → stdl-0.8.0}/stdl/st.py +15 -1
- stdl-0.7.1/.editorconfig +0 -12
- stdl-0.7.1/.github/workflows/lint.yml +0 -23
- stdl-0.7.1/.github/workflows/publish.yml +0 -25
- stdl-0.7.1/.github/workflows/test.yml +0 -33
- stdl-0.7.1/.gitignore +0 -134
- stdl-0.7.1/.pre-commit-config.yaml +0 -15
- stdl-0.7.1/.python-version +0 -1
- stdl-0.7.1/.readthedocs.yml +0 -31
- stdl-0.7.1/CONTRIBUTING.md +0 -81
- stdl-0.7.1/Justfile +0 -65
- stdl-0.7.1/docs/index.md +0 -45
- stdl-0.7.1/docs/reference/color.md +0 -1
- stdl-0.7.1/docs/reference/decorators.md +0 -1
- stdl-0.7.1/docs/reference/dt.md +0 -1
- stdl-0.7.1/docs/reference/fs.md +0 -1
- stdl-0.7.1/docs/reference/import_lazy.md +0 -1
- stdl-0.7.1/docs/reference/log.md +0 -1
- stdl-0.7.1/docs/reference/net.md +0 -1
- stdl-0.7.1/docs/reference/st.md +0 -1
- stdl-0.7.1/docs/requirements.txt +0 -4
- stdl-0.7.1/mkdocs.yml +0 -98
- stdl-0.7.1/stdl/__init__.py +0 -2
- stdl-0.7.1/tests/test_color.py +0 -751
- stdl-0.7.1/tests/test_decorators.py +0 -108
- stdl-0.7.1/tests/test_dt.py +0 -284
- stdl-0.7.1/tests/test_fs.py +0 -2004
- stdl-0.7.1/tests/test_fs_async.py +0 -536
- stdl-0.7.1/tests/test_lst.py +0 -27
- stdl-0.7.1/tests/test_pydantic_integration.py +0 -136
- stdl-0.7.1/tests/test_st.py +0 -176
- stdl-0.7.1/uv.lock +0 -1068
- {stdl-0.7.1 → stdl-0.8.0}/LICENSE +0 -0
|
@@ -1,75 +1,53 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stdl
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Extended Python Standard Library
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Project-URL: Homepage, https://github.com/zigai/stdl
|
|
5
|
+
Keywords: stdl,standard-library,python-utilities,filesystem,list-utils,ansi-colors,color-formats,terminal-links,lazy-import,text-processing
|
|
6
|
+
Author: Žiga Ivanšek
|
|
8
7
|
Author-email: Žiga Ivanšek <ziga.ivansek@gmail.com>
|
|
9
|
-
License: MIT
|
|
10
|
-
|
|
11
|
-
Copyright (c) 2022 Žiga Ivanšek
|
|
12
|
-
|
|
13
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
-
in the Software without restriction, including without limitation the rights
|
|
16
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
-
furnished to do so, subject to the following conditions:
|
|
19
|
-
|
|
20
|
-
The above copyright notice and this permission notice shall be included in all
|
|
21
|
-
copies or substantial portions of the Software.
|
|
22
|
-
|
|
23
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
-
SOFTWARE.
|
|
8
|
+
License-Expression: MIT
|
|
30
9
|
License-File: LICENSE
|
|
31
|
-
|
|
32
|
-
Classifier: Intended Audience :: Developers
|
|
33
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Typing :: Typed
|
|
34
11
|
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
14
|
+
Classifier: Topic :: Utilities
|
|
15
|
+
Classifier: Topic :: System :: Filesystems
|
|
16
|
+
Classifier: Topic :: Text Processing :: General
|
|
35
17
|
Classifier: Programming Language :: Python
|
|
36
18
|
Classifier: Programming Language :: Python :: 3
|
|
37
19
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
38
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
39
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
40
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
41
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
42
23
|
Classifier: Programming Language :: Python :: 3.14
|
|
43
|
-
Classifier:
|
|
44
|
-
Classifier: Topic :: System :: Filesystems
|
|
45
|
-
Classifier: Topic :: Text Processing :: General
|
|
46
|
-
Classifier: Topic :: Utilities
|
|
47
|
-
Classifier: Typing :: Typed
|
|
48
|
-
Requires-Python: >=3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
49
25
|
Requires-Dist: python-dateutil>=2.8.2
|
|
50
26
|
Requires-Dist: pyyaml>=6.0.2
|
|
51
27
|
Requires-Dist: toml>=0.10.2
|
|
52
|
-
Requires-Dist:
|
|
28
|
+
Requires-Dist: anyio>=4.0.0 ; extra == 'async'
|
|
29
|
+
Requires-Dist: anyio>=4.0.0 ; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=9.0.3 ; extra == 'dev'
|
|
31
|
+
Requires-Dist: coverage>=7.14.1 ; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff==0.16.10 ; extra == 'dev'
|
|
33
|
+
Requires-Dist: pre-commit>=4.6.0 ; extra == 'dev'
|
|
34
|
+
Requires-Dist: pyrefly>=1.0.0 ; extra == 'dev'
|
|
35
|
+
Requires-Dist: codespell>=2.4.2 ; extra == 'dev'
|
|
36
|
+
Requires-Dist: pydantic>=2 ; extra == 'dev'
|
|
37
|
+
Requires-Dist: rattle-lint>=3.0.0 ; extra == 'dev'
|
|
38
|
+
Requires-Dist: tqdm>=4.67.1 ; extra == 'full'
|
|
39
|
+
Requires-Dist: anyio>=4.0.0 ; extra == 'test'
|
|
40
|
+
Requires-Dist: pytest>=9.0.3 ; extra == 'test'
|
|
41
|
+
Requires-Dist: coverage>=7.14.1 ; extra == 'test'
|
|
42
|
+
Requires-Dist: pydantic>=2 ; extra == 'test'
|
|
43
|
+
Requires-Python: >=3.11
|
|
44
|
+
Project-URL: Repository, https://github.com/zigai/stdl
|
|
45
|
+
Project-URL: Issues, https://github.com/zigai/stdl/issues
|
|
46
|
+
Project-URL: Homepage, https://github.com/zigai/stdl
|
|
53
47
|
Provides-Extra: async
|
|
54
|
-
Requires-Dist: anyio>=4.0.0; extra == 'async'
|
|
55
48
|
Provides-Extra: dev
|
|
56
|
-
Requires-Dist: anyio>=4.0.0; extra == 'dev'
|
|
57
|
-
Requires-Dist: codespell>=2.4.2; extra == 'dev'
|
|
58
|
-
Requires-Dist: coverage>=7.13.5; extra == 'dev'
|
|
59
|
-
Requires-Dist: mypy>=1.19.1; extra == 'dev'
|
|
60
|
-
Requires-Dist: pre-commit>=4.5.1; extra == 'dev'
|
|
61
|
-
Requires-Dist: pydantic>=2; extra == 'dev'
|
|
62
|
-
Requires-Dist: pytest>=9.0.2; extra == 'dev'
|
|
63
|
-
Requires-Dist: rattle-blank-lines>=0.2.6; extra == 'dev'
|
|
64
|
-
Requires-Dist: rattle-lint>=1.0.6; extra == 'dev'
|
|
65
|
-
Requires-Dist: ruff==0.15.8; extra == 'dev'
|
|
66
49
|
Provides-Extra: full
|
|
67
|
-
Requires-Dist: tqdm>=4.67.1; extra == 'full'
|
|
68
50
|
Provides-Extra: test
|
|
69
|
-
Requires-Dist: anyio>=4.0.0; extra == 'test'
|
|
70
|
-
Requires-Dist: coverage>=7.13.5; extra == 'test'
|
|
71
|
-
Requires-Dist: pydantic>=2; extra == 'test'
|
|
72
|
-
Requires-Dist: pytest>=9.0.2; extra == 'test'
|
|
73
51
|
Description-Content-Type: text/markdown
|
|
74
52
|
|
|
75
53
|
# stdl
|
|
@@ -77,7 +55,7 @@ Description-Content-Type: text/markdown
|
|
|
77
55
|
[](https://github.com/zigai/stdl/actions/workflows/test.yml)
|
|
78
56
|
[](https://stdl.readthedocs.io/en/latest/?badge=latest)
|
|
79
57
|
[](https://badge.fury.io/py/stdl)
|
|
80
|
-

|
|
81
59
|
[](https://pepy.tech/project/stdl)
|
|
82
60
|
[](https://github.com/zigai/stdl/blob/master/LICENSE)
|
|
83
61
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://github.com/zigai/stdl/actions/workflows/test.yml)
|
|
4
4
|
[](https://stdl.readthedocs.io/en/latest/?badge=latest)
|
|
5
5
|
[](https://badge.fury.io/py/stdl)
|
|
6
|
-

|
|
7
7
|
[](https://pepy.tech/project/stdl)
|
|
8
8
|
[](https://github.com/zigai/stdl/blob/master/LICENSE)
|
|
9
9
|
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "stdl"
|
|
3
|
+
version = "0.8.0"
|
|
4
|
+
description = "Extended Python Standard Library"
|
|
5
|
+
license = "MIT"
|
|
6
|
+
license-files = ["LICENSE"]
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
requires-python = ">=3.11"
|
|
9
|
+
dependencies = [
|
|
10
|
+
"python-dateutil>=2.8.2",
|
|
11
|
+
"pyyaml>=6.0.2",
|
|
12
|
+
"toml>=0.10.2",
|
|
13
|
+
]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Typing :: Typed",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
19
|
+
"Topic :: Utilities",
|
|
20
|
+
"Topic :: System :: Filesystems",
|
|
21
|
+
"Topic :: Text Processing :: General",
|
|
22
|
+
"Programming Language :: Python",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Programming Language :: Python :: 3.14",
|
|
29
|
+
"Programming Language :: Python :: 3.15",
|
|
30
|
+
]
|
|
31
|
+
keywords = [
|
|
32
|
+
"stdl",
|
|
33
|
+
"standard-library",
|
|
34
|
+
"python-utilities",
|
|
35
|
+
"filesystem",
|
|
36
|
+
"list-utils",
|
|
37
|
+
"ansi-colors",
|
|
38
|
+
"color-formats",
|
|
39
|
+
"terminal-links",
|
|
40
|
+
"lazy-import",
|
|
41
|
+
"text-processing",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[[project.authors]]
|
|
45
|
+
name = "Žiga Ivanšek"
|
|
46
|
+
email = "ziga.ivansek@gmail.com"
|
|
47
|
+
|
|
48
|
+
[project.optional-dependencies]
|
|
49
|
+
async = ["anyio>=4.0.0"]
|
|
50
|
+
full = ["tqdm>=4.67.1"]
|
|
51
|
+
dev = [
|
|
52
|
+
"anyio>=4.0.0",
|
|
53
|
+
"pytest>=9.0.3",
|
|
54
|
+
"coverage>=7.14.1",
|
|
55
|
+
"ruff==0.16.10",
|
|
56
|
+
"pre-commit>=4.6.0",
|
|
57
|
+
"pyrefly>=1.0.0",
|
|
58
|
+
"codespell>=2.4.2",
|
|
59
|
+
"pydantic>=2",
|
|
60
|
+
"rattle-lint>=3.0.0",
|
|
61
|
+
]
|
|
62
|
+
test = [
|
|
63
|
+
"anyio>=4.0.0",
|
|
64
|
+
"pytest>=9.0.3",
|
|
65
|
+
"coverage>=7.14.1",
|
|
66
|
+
"pydantic>=2",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[project.urls]
|
|
70
|
+
Repository = "https://github.com/zigai/stdl"
|
|
71
|
+
Issues = "https://github.com/zigai/stdl/issues"
|
|
72
|
+
Homepage = "https://github.com/zigai/stdl"
|
|
73
|
+
|
|
74
|
+
[build-system]
|
|
75
|
+
requires = ["uv_build>=0.11.25,<0.12.0"]
|
|
76
|
+
build-backend = "uv_build"
|
|
77
|
+
|
|
78
|
+
[tool.codespell]
|
|
79
|
+
skip = ".git,uv.lock"
|
|
80
|
+
|
|
81
|
+
[tool.coverage.run]
|
|
82
|
+
source = ["stdl"]
|
|
83
|
+
branch = true
|
|
84
|
+
|
|
85
|
+
[tool.coverage.report]
|
|
86
|
+
exclude_lines = [
|
|
87
|
+
"pragma: no cover",
|
|
88
|
+
"raise NotImplementedError",
|
|
89
|
+
"if TYPE_CHECKING:",
|
|
90
|
+
"if typing.TYPE_CHECKING:",
|
|
91
|
+
]
|
|
92
|
+
omit = [
|
|
93
|
+
"tests/*",
|
|
94
|
+
"tests/**",
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
[tool.pyrefly]
|
|
98
|
+
project-includes = ["stdl"]
|
|
99
|
+
project-excludes = ["tests/**"]
|
|
100
|
+
disable-project-excludes-heuristics = true
|
|
101
|
+
search-path = ["."]
|
|
102
|
+
disable-search-path-heuristics = true
|
|
103
|
+
python-version = "3.11"
|
|
104
|
+
enabled-ignores = [
|
|
105
|
+
"type",
|
|
106
|
+
"pyrefly",
|
|
107
|
+
]
|
|
108
|
+
use-ignore-files = false
|
|
109
|
+
check-unannotated-defs = true
|
|
110
|
+
infer-return-types = "checked"
|
|
111
|
+
infer-with-first-use = true
|
|
112
|
+
strict-callable-subtyping = false
|
|
113
|
+
spec-compliant-overloads = false
|
|
114
|
+
|
|
115
|
+
[tool.rattle]
|
|
116
|
+
root = true
|
|
117
|
+
enable = [
|
|
118
|
+
"blank-line-after-control-block",
|
|
119
|
+
"blank-line-after-terminal-control-block",
|
|
120
|
+
"blank-line-before-branch",
|
|
121
|
+
"blank-line-before-unrelated-block",
|
|
122
|
+
"no-suite-leading-trailing-blank-lines",
|
|
123
|
+
"module-all-at-bottom",
|
|
124
|
+
"no-underscore-all-exports",
|
|
125
|
+
"forbidden-call",
|
|
126
|
+
"no-relative-imports",
|
|
127
|
+
"no-underscore-import-aliases",
|
|
128
|
+
"no-unsafe-tempfile-factories",
|
|
129
|
+
"no-annotated-self",
|
|
130
|
+
"no-exception-message-variables",
|
|
131
|
+
"no-str-exception-translation",
|
|
132
|
+
"no-underscore-class",
|
|
133
|
+
"public-method-order",
|
|
134
|
+
"no-bare-object-annotations",
|
|
135
|
+
"no-named-tuple",
|
|
136
|
+
"no-static-if-condition",
|
|
137
|
+
"sorted-attributes",
|
|
138
|
+
"use-callable-ellipsis",
|
|
139
|
+
]
|
|
140
|
+
|
|
141
|
+
[tool.rattle.options.forbidden-call]
|
|
142
|
+
forbidden_calls = ["typing.cast"]
|
|
143
|
+
|
|
144
|
+
[tool.ruff]
|
|
145
|
+
line-length = 100
|
|
146
|
+
|
|
147
|
+
[tool.ruff.lint]
|
|
148
|
+
select = ["ALL"]
|
|
149
|
+
ignore = [
|
|
150
|
+
"ERA",
|
|
151
|
+
"FBT002",
|
|
152
|
+
"COM",
|
|
153
|
+
"CPY",
|
|
154
|
+
"DJ",
|
|
155
|
+
"ANN003",
|
|
156
|
+
"FIX",
|
|
157
|
+
"D100",
|
|
158
|
+
"D101",
|
|
159
|
+
"D102",
|
|
160
|
+
"D103",
|
|
161
|
+
"D104",
|
|
162
|
+
"D105",
|
|
163
|
+
"D106",
|
|
164
|
+
"D107",
|
|
165
|
+
"D205",
|
|
166
|
+
"D203",
|
|
167
|
+
"D212",
|
|
168
|
+
"E501",
|
|
169
|
+
"PIE804",
|
|
170
|
+
"S101",
|
|
171
|
+
"EM101",
|
|
172
|
+
"PYI041",
|
|
173
|
+
"PYI051",
|
|
174
|
+
"PYI046",
|
|
175
|
+
"PYI047",
|
|
176
|
+
"PYI049",
|
|
177
|
+
"PYI053",
|
|
178
|
+
"PYI054",
|
|
179
|
+
"RET501",
|
|
180
|
+
"SIM910",
|
|
181
|
+
"N812",
|
|
182
|
+
"PLC0415",
|
|
183
|
+
"PLR0904",
|
|
184
|
+
"PLR0913",
|
|
185
|
+
"PLR0917",
|
|
186
|
+
"PLR2004",
|
|
187
|
+
"PLR1711",
|
|
188
|
+
"TRY003",
|
|
189
|
+
"T20",
|
|
190
|
+
"SIM105",
|
|
191
|
+
"RET504",
|
|
192
|
+
"PLR0912",
|
|
193
|
+
"PLR0915",
|
|
194
|
+
"SIM105",
|
|
195
|
+
"TD",
|
|
196
|
+
"TC001",
|
|
197
|
+
"TC002",
|
|
198
|
+
"TC003",
|
|
199
|
+
"TC006",
|
|
200
|
+
"PLW0603",
|
|
201
|
+
"EM102",
|
|
202
|
+
"PLW2901",
|
|
203
|
+
"RSE102",
|
|
204
|
+
"PGH004",
|
|
205
|
+
"N806",
|
|
206
|
+
"FBT001",
|
|
207
|
+
"PTH",
|
|
208
|
+
"S310",
|
|
209
|
+
]
|
|
210
|
+
exclude = ["build"]
|
|
211
|
+
|
|
212
|
+
[tool.ruff.lint.per-file-ignores]
|
|
213
|
+
"__init__.py" = [
|
|
214
|
+
"F401",
|
|
215
|
+
"E402",
|
|
216
|
+
]
|
|
217
|
+
"**/tests/**/*.py" = [
|
|
218
|
+
"S104",
|
|
219
|
+
"S105",
|
|
220
|
+
"S106",
|
|
221
|
+
"TRY004",
|
|
222
|
+
"RUF003",
|
|
223
|
+
"RUF012",
|
|
224
|
+
"UP031",
|
|
225
|
+
"SLF001",
|
|
226
|
+
"ARG",
|
|
227
|
+
"N806",
|
|
228
|
+
"ANN001",
|
|
229
|
+
"ANN201",
|
|
230
|
+
"ANN202",
|
|
231
|
+
"ANN204",
|
|
232
|
+
"ANN401",
|
|
233
|
+
"S",
|
|
234
|
+
"SLF001",
|
|
235
|
+
"INP001",
|
|
236
|
+
"PLW0108",
|
|
237
|
+
"EM102",
|
|
238
|
+
"FBT001",
|
|
239
|
+
"SIM300",
|
|
240
|
+
"DTZ001",
|
|
241
|
+
]
|
|
242
|
+
"examples/*.py" = ["INP001"]
|
|
243
|
+
|
|
244
|
+
[tool.ruff.lint.pep8-naming]
|
|
245
|
+
classmethod-decorators = [
|
|
246
|
+
"pydantic.validator",
|
|
247
|
+
"declared_attr",
|
|
248
|
+
"expression",
|
|
249
|
+
"comparator",
|
|
250
|
+
]
|
|
251
|
+
|
|
252
|
+
[tool.ruff.lint.flake8-builtins]
|
|
253
|
+
ignorelist = [
|
|
254
|
+
"id",
|
|
255
|
+
"input",
|
|
256
|
+
]
|
|
257
|
+
|
|
258
|
+
[tool.ruff.lint.flake8-type-checking]
|
|
259
|
+
runtime-evaluated-base-classes = [
|
|
260
|
+
"pydantic.BaseModel",
|
|
261
|
+
"sqlalchemy.orm.DeclarativeBase",
|
|
262
|
+
]
|
|
263
|
+
|
|
264
|
+
[tool.ruff.lint.isort]
|
|
265
|
+
known-first-party = [
|
|
266
|
+
"stdl",
|
|
267
|
+
"tests",
|
|
268
|
+
]
|
|
269
|
+
|
|
270
|
+
[tool.ruff.lint.pydocstyle]
|
|
271
|
+
convention = "google"
|
|
272
|
+
|
|
273
|
+
[tool.ruff.format]
|
|
274
|
+
quote-style = "double"
|
|
275
|
+
indent-style = "space"
|
|
276
|
+
skip-magic-trailing-comma = false
|
|
277
|
+
line-ending = "lf"
|
|
278
|
+
|
|
279
|
+
[tool.uv]
|
|
280
|
+
default-groups = ["test"]
|
|
281
|
+
|
|
282
|
+
[tool.uv.build-backend]
|
|
283
|
+
module-name = "stdl"
|
|
284
|
+
module-root = ""
|
|
285
|
+
|
|
286
|
+
[dependency-groups]
|
|
287
|
+
test = [
|
|
288
|
+
"anyio>=4.0.0",
|
|
289
|
+
"pytest>=9.0.3",
|
|
290
|
+
"coverage>=7.14.1",
|
|
291
|
+
"pydantic>=2",
|
|
292
|
+
]
|
|
293
|
+
dev = [
|
|
294
|
+
{ include-group = "test" },
|
|
295
|
+
"ruff==0.16.10",
|
|
296
|
+
"pre-commit>=4.6.0",
|
|
297
|
+
"pyrefly>=1.0.0",
|
|
298
|
+
"codespell>=2.4.2",
|
|
299
|
+
"rattle-lint>=3.0.0",
|
|
300
|
+
]
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "stdl"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.0"
|
|
4
4
|
description = "Extended Python Standard Library"
|
|
5
5
|
authors = [{ name = "Žiga Ivanšek", email = "ziga.ivansek@gmail.com" }]
|
|
6
|
-
license =
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
7
8
|
readme = "README.md"
|
|
8
|
-
requires-python = ">=3.
|
|
9
|
+
requires-python = ">=3.11"
|
|
9
10
|
dependencies = [
|
|
10
11
|
"python-dateutil>=2.8.2",
|
|
11
12
|
"pyyaml>=6.0.2",
|
|
12
13
|
"toml>=0.10.2",
|
|
13
|
-
"typing_extensions>=4.0; python_version < '3.11'",
|
|
14
14
|
]
|
|
15
15
|
|
|
16
16
|
classifiers = [
|
|
17
|
-
"License :: OSI Approved :: MIT License",
|
|
18
17
|
"Typing :: Typed",
|
|
19
18
|
"Operating System :: OS Independent",
|
|
20
19
|
"Intended Audience :: Developers",
|
|
@@ -25,11 +24,11 @@ classifiers = [
|
|
|
25
24
|
"Programming Language :: Python",
|
|
26
25
|
"Programming Language :: Python :: 3",
|
|
27
26
|
"Programming Language :: Python :: 3 :: Only",
|
|
28
|
-
"Programming Language :: Python :: 3.10",
|
|
29
27
|
"Programming Language :: Python :: 3.11",
|
|
30
28
|
"Programming Language :: Python :: 3.12",
|
|
31
29
|
"Programming Language :: Python :: 3.13",
|
|
32
30
|
"Programming Language :: Python :: 3.14",
|
|
31
|
+
"Programming Language :: Python :: 3.15",
|
|
33
32
|
]
|
|
34
33
|
|
|
35
34
|
keywords = [
|
|
@@ -50,44 +49,33 @@ async = ["anyio>=4.0.0"]
|
|
|
50
49
|
full = ["tqdm>=4.67.1"]
|
|
51
50
|
dev = [
|
|
52
51
|
"anyio>=4.0.0",
|
|
53
|
-
"pytest>=9.0.
|
|
54
|
-
"coverage>=7.
|
|
55
|
-
"ruff==0.
|
|
56
|
-
"pre-commit>=4.
|
|
57
|
-
"
|
|
52
|
+
"pytest>=9.0.3",
|
|
53
|
+
"coverage>=7.14.1",
|
|
54
|
+
"ruff==0.16.10",
|
|
55
|
+
"pre-commit>=4.6.0",
|
|
56
|
+
"pyrefly>=1.0.0",
|
|
58
57
|
"codespell>=2.4.2",
|
|
59
58
|
"pydantic>=2",
|
|
60
|
-
"rattle-lint>=
|
|
61
|
-
"rattle-blank-lines>=0.2.6",
|
|
59
|
+
"rattle-lint>=3.0.0",
|
|
62
60
|
]
|
|
63
61
|
|
|
64
|
-
test = ["anyio>=4.0.0", "pytest>=9.0.
|
|
62
|
+
test = ["anyio>=4.0.0", "pytest>=9.0.3", "coverage>=7.14.1", "pydantic>=2"]
|
|
65
63
|
[project.urls]
|
|
66
64
|
Repository = "https://github.com/zigai/stdl"
|
|
67
65
|
Issues = "https://github.com/zigai/stdl/issues"
|
|
68
66
|
Homepage = "https://github.com/zigai/stdl"
|
|
69
67
|
|
|
70
68
|
[build-system]
|
|
71
|
-
requires = ["
|
|
72
|
-
build-backend = "
|
|
69
|
+
requires = ["uv_build>=0.11.25,<0.12.0"]
|
|
70
|
+
build-backend = "uv_build"
|
|
73
71
|
|
|
74
|
-
[tool.
|
|
75
|
-
|
|
72
|
+
[tool.uv.build-backend]
|
|
73
|
+
module-name = "stdl"
|
|
74
|
+
module-root = ""
|
|
76
75
|
|
|
77
76
|
[tool.codespell]
|
|
78
77
|
skip = '.git,uv.lock'
|
|
79
78
|
|
|
80
|
-
[tool.hatch.envs.test]
|
|
81
|
-
features = ["test"]
|
|
82
|
-
installer = "uv"
|
|
83
|
-
|
|
84
|
-
[[tool.hatch.envs.test.matrix]]
|
|
85
|
-
python = ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
86
|
-
|
|
87
|
-
[tool.hatch.envs.test.scripts]
|
|
88
|
-
test = "pytest {args}"
|
|
89
|
-
cov = "coverage run -m pytest {args}"
|
|
90
|
-
|
|
91
79
|
[tool.coverage.run]
|
|
92
80
|
source = ["stdl"]
|
|
93
81
|
branch = true
|
|
@@ -101,26 +89,49 @@ exclude_lines = [
|
|
|
101
89
|
]
|
|
102
90
|
omit = ["tests/*", "tests/**"]
|
|
103
91
|
|
|
104
|
-
[tool.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
ignore_missing_imports = true
|
|
92
|
+
[tool.pyrefly]
|
|
93
|
+
project-includes = ["stdl"]
|
|
94
|
+
project-excludes = ["tests/**"]
|
|
95
|
+
disable-project-excludes-heuristics = true
|
|
96
|
+
search-path = ["."]
|
|
97
|
+
disable-search-path-heuristics = true
|
|
98
|
+
python-version = "3.11"
|
|
99
|
+
enabled-ignores = ["type", "pyrefly"]
|
|
100
|
+
use-ignore-files = false
|
|
101
|
+
check-unannotated-defs = true
|
|
102
|
+
infer-return-types = "checked"
|
|
103
|
+
infer-with-first-use = true
|
|
104
|
+
strict-callable-subtyping = false
|
|
105
|
+
spec-compliant-overloads = false
|
|
119
106
|
|
|
120
107
|
[tool.rattle]
|
|
121
108
|
root = true
|
|
122
|
-
enable = [
|
|
123
|
-
|
|
109
|
+
enable = [
|
|
110
|
+
"blank-line-after-control-block",
|
|
111
|
+
"blank-line-after-terminal-control-block",
|
|
112
|
+
"blank-line-before-branch",
|
|
113
|
+
"blank-line-before-unrelated-block",
|
|
114
|
+
"no-suite-leading-trailing-blank-lines",
|
|
115
|
+
"module-all-at-bottom",
|
|
116
|
+
"no-underscore-all-exports",
|
|
117
|
+
"forbidden-call",
|
|
118
|
+
"no-relative-imports",
|
|
119
|
+
"no-underscore-import-aliases",
|
|
120
|
+
"no-unsafe-tempfile-factories",
|
|
121
|
+
"no-annotated-self",
|
|
122
|
+
"no-exception-message-variables",
|
|
123
|
+
"no-str-exception-translation",
|
|
124
|
+
"no-underscore-class",
|
|
125
|
+
"public-method-order",
|
|
126
|
+
"no-bare-object-annotations",
|
|
127
|
+
"no-named-tuple",
|
|
128
|
+
"no-static-if-condition",
|
|
129
|
+
"sorted-attributes",
|
|
130
|
+
"use-callable-ellipsis",
|
|
131
|
+
]
|
|
132
|
+
|
|
133
|
+
[tool.rattle.options."forbidden-call"]
|
|
134
|
+
forbidden_calls = ["typing.cast"]
|
|
124
135
|
|
|
125
136
|
[tool.ruff]
|
|
126
137
|
line-length = 100
|
|
@@ -163,6 +174,7 @@ ignore = [
|
|
|
163
174
|
"PLC0415",
|
|
164
175
|
"PLR0904",
|
|
165
176
|
"PLR0913",
|
|
177
|
+
"PLR0917",
|
|
166
178
|
"PLR2004",
|
|
167
179
|
"PLR1711",
|
|
168
180
|
"TRY003",
|
|
@@ -249,3 +261,10 @@ known-first-party = ["stdl", "tests"]
|
|
|
249
261
|
|
|
250
262
|
[tool.ruff.lint.pydocstyle]
|
|
251
263
|
convention = "google"
|
|
264
|
+
|
|
265
|
+
[tool.uv]
|
|
266
|
+
default-groups = ["test"]
|
|
267
|
+
|
|
268
|
+
[dependency-groups]
|
|
269
|
+
test = ["anyio>=4.0.0", "pytest>=9.0.3", "coverage>=7.14.1", "pydantic>=2"]
|
|
270
|
+
dev = [{include-group = "test"}, "ruff==0.16.10", "pre-commit>=4.6.0", "pyrefly>=1.0.0", "codespell>=2.4.2", "rattle-lint>=3.0.0"]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from types import ModuleType
|
|
4
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from stdl.fs import AsyncFileHandle, Directory, File
|
|
8
|
+
|
|
9
|
+
LazyExport: TypeAlias = "ModuleType | type[AsyncFileHandle[str] | Directory | File]"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def __getattr__(name: str) -> LazyExport:
|
|
13
|
+
"""Lazily resolve public package exports."""
|
|
14
|
+
if name in {"AsyncFileHandle", "Directory", "File"}:
|
|
15
|
+
from stdl import fs
|
|
16
|
+
|
|
17
|
+
return getattr(fs, name)
|
|
18
|
+
if name in {"color", "decorators", "dt", "fs", "import_lazy", "log", "lst", "net", "st"}:
|
|
19
|
+
import importlib
|
|
20
|
+
|
|
21
|
+
return importlib.import_module(f"stdl.{name}")
|
|
22
|
+
|
|
23
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"AsyncFileHandle",
|
|
28
|
+
"Directory",
|
|
29
|
+
"File",
|
|
30
|
+
"color",
|
|
31
|
+
"decorators",
|
|
32
|
+
"dt",
|
|
33
|
+
"fs",
|
|
34
|
+
"import_lazy",
|
|
35
|
+
"log",
|
|
36
|
+
"lst",
|
|
37
|
+
"net",
|
|
38
|
+
"st",
|
|
39
|
+
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from stdl import color as color
|
|
2
|
+
from stdl import decorators as decorators
|
|
3
|
+
from stdl import dt as dt
|
|
4
|
+
from stdl import fs as fs
|
|
5
|
+
from stdl import import_lazy as import_lazy
|
|
6
|
+
from stdl import log as log
|
|
7
|
+
from stdl import lst as lst
|
|
8
|
+
from stdl import net as net
|
|
9
|
+
from stdl import st as st
|
|
10
|
+
from stdl.fs import AsyncFileHandle as AsyncFileHandle
|
|
11
|
+
from stdl.fs import Directory as Directory
|
|
12
|
+
from stdl.fs import File as File
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"AsyncFileHandle",
|
|
16
|
+
"Directory",
|
|
17
|
+
"File",
|
|
18
|
+
"color",
|
|
19
|
+
"decorators",
|
|
20
|
+
"dt",
|
|
21
|
+
"fs",
|
|
22
|
+
"import_lazy",
|
|
23
|
+
"log",
|
|
24
|
+
"lst",
|
|
25
|
+
"net",
|
|
26
|
+
"st",
|
|
27
|
+
]
|