jetpytools 2.2.6__tar.gz → 2.2.7__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.
- {jetpytools-2.2.6 → jetpytools-2.2.7}/PKG-INFO +1 -1
- jetpytools-2.2.7/jetpytools/_version.py +2 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/utils/file.py +8 -2
- jetpytools-2.2.6/jetpytools/_version.py +0 -2
- {jetpytools-2.2.6 → jetpytools-2.2.7}/.gitignore +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/LICENSE +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/README.md +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/__init__.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/enums/__init__.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/enums/base.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/enums/other.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/exceptions/__init__.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/exceptions/base.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/exceptions/enum.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/exceptions/file.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/exceptions/generic.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/exceptions/module.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/functions/__init__.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/functions/funcs.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/functions/normalize.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/functions/other.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/py.typed +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/types/__init__.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/types/builtins.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/types/check.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/types/file.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/types/funcs.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/types/generic.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/types/supports.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/types/utils.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/utils/__init__.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/utils/funcs.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/utils/math.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/jetpytools/utils/ranges.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/pyproject.toml +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/tests/test_file.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/tests/test_funcs.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/tests/test_normalize.py +0 -0
- {jetpytools-2.2.6 → jetpytools-2.2.7}/tests/test_types_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jetpytools
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.7
|
|
4
4
|
Summary: Collection of stuff that's useful in general python programming
|
|
5
5
|
Project-URL: Source Code, https://github.com/Jaded-Encoding-Thaumaturgy/jetpytools
|
|
6
6
|
Project-URL: Contact, https://discord.gg/XTpc6Fa9eB
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import linecache
|
|
3
4
|
import sys
|
|
4
5
|
from os import F_OK, R_OK, W_OK, X_OK, access, getenv, path
|
|
5
6
|
from pathlib import Path
|
|
@@ -61,9 +62,14 @@ def get_script_path() -> SPath:
|
|
|
61
62
|
filename = frame.f_code.co_filename
|
|
62
63
|
|
|
63
64
|
# - No __package__ (execution entry point)
|
|
64
|
-
# - Is a file on disk
|
|
65
65
|
# - Not in site-packages
|
|
66
|
-
|
|
66
|
+
# - Is a file on disk
|
|
67
|
+
# - Is a virtual file
|
|
68
|
+
if (
|
|
69
|
+
not f_globals.get("__package__")
|
|
70
|
+
and "site-packages" not in filename
|
|
71
|
+
and (path.isfile(filename) or filename in linecache.cache)
|
|
72
|
+
):
|
|
67
73
|
return SPath(filename)
|
|
68
74
|
|
|
69
75
|
frame = frame.f_back
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|