abstract-utilities 0.2.2.453__py3-none-any.whl → 0.2.2.476__py3-none-any.whl

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.

Potentially problematic release.


This version of abstract-utilities might be problematic. Click here for more details.

Files changed (28) hide show
  1. abstract_utilities/__init__.py +1 -1
  2. abstract_utilities/class_utils.py +0 -1
  3. abstract_utilities/file_utils/file_utils/__init__.py +1 -0
  4. abstract_utilities/file_utils/file_utils/file_utils.py +3 -3
  5. abstract_utilities/file_utils/file_utils/find_collect.py +1 -0
  6. abstract_utilities/file_utils/file_utils/imports/__init__.py +3 -0
  7. abstract_utilities/file_utils/file_utils/imports/constants.py +39 -0
  8. abstract_utilities/file_utils/file_utils/imports/file_functions.py +10 -0
  9. abstract_utilities/file_utils/file_utils/imports/imports.py +39 -0
  10. abstract_utilities/file_utils/file_utils/imports/module_imports.py +13 -0
  11. abstract_utilities/file_utils/file_utils/imports.py +9 -0
  12. abstract_utilities/file_utils/file_utils/type_checks.py +82 -0
  13. abstract_utilities/file_utils/imports/__init__.py +1 -2
  14. abstract_utilities/file_utils/imports/clean_imps.py +158 -0
  15. abstract_utilities/file_utils/imports/file_functions.py +1 -1
  16. abstract_utilities/file_utils/imports/imports.py +59 -7
  17. abstract_utilities/file_utils/imports/module_imports.py +6 -3
  18. abstract_utilities/read_write_utils.py +80 -1
  19. abstract_utilities/robust_reader/imports/imports.py +0 -9
  20. abstract_utilities/robust_readers/import_utils/__init__.py +1 -0
  21. abstract_utilities/robust_readers/import_utils/clean_imports.py +175 -0
  22. abstract_utilities/string_clean.py +40 -1
  23. abstract_utilities/string_utils.py +36 -0
  24. abstract_utilities/type_utils.py +25 -1
  25. {abstract_utilities-0.2.2.453.dist-info → abstract_utilities-0.2.2.476.dist-info}/METADATA +1 -1
  26. {abstract_utilities-0.2.2.453.dist-info → abstract_utilities-0.2.2.476.dist-info}/RECORD +28 -20
  27. {abstract_utilities-0.2.2.453.dist-info → abstract_utilities-0.2.2.476.dist-info}/WHEEL +0 -0
  28. {abstract_utilities-0.2.2.453.dist-info → abstract_utilities-0.2.2.476.dist-info}/top_level.txt +0 -0
@@ -116,10 +116,10 @@ from .parse_utils import (num_tokens_from_string,
116
116
 
117
117
  from .log_utils import get_caller_info,get_logFile,print_or_log,get_json_call_response,initialize_call_log
118
118
  from .error_utils import try_func
119
- from .class_utils import alias,get_class_inputs,get_set_attr
120
119
  from .ssh_utils import *
121
120
  from .env_utils import *
122
121
  from .path_utils import *
123
122
  from .file_utils import *
124
123
  from .file_utils import call_for_all_tabs
125
124
  from .string_utils import *
125
+ from .class_utils import alias,get_class_inputs,get_set_attr,get_caller_path,get_caller_dir
@@ -405,4 +405,3 @@ def get_caller_dir(i: Optional[int] = None) -> str:
405
405
  abspath = get_caller_path(depth + 1)
406
406
  return os.path.dirname(abspath)
407
407
 
408
-
@@ -5,3 +5,4 @@ from .map_utils import *
5
5
  from .pdf_utils import *
6
6
  from .file_reader import *
7
7
  from .find_collect import *
8
+ from .type_checks import *
@@ -1,7 +1,7 @@
1
- from pathlib import Path
2
- from typing import *
3
- import fnmatch, os, glob
1
+
4
2
  from .filter_params import *
3
+ from .imports import *
4
+
5
5
  ##from abstract_utilities import make_list,get_media_exts, is_media_type
6
6
  def get_allowed_predicate(allowed=None):
7
7
  if allowed != False:
@@ -72,6 +72,7 @@ def get_find_cmd(
72
72
  mtime: Optional[str] = None,
73
73
  perm: Optional[str] = None,
74
74
  user: Optional[str] = None,
75
+ **kwargs
75
76
  ) -> str:
76
77
  """Constructs a Unix `find` command string from keyword args."""
77
78
  cmd = [f"find {directory}"]
@@ -0,0 +1,3 @@
1
+ from .constants import *
2
+ from .imports import *
3
+ from ..imports import *
@@ -0,0 +1,39 @@
1
+ from .imports import *
2
+ from .module_imports import *
3
+ @dataclass
4
+ class ScanConfig:
5
+ allowed_exts: Set[str]
6
+ unallowed_exts: Set[str]
7
+ exclude_types: Set[str]
8
+ exclude_dirs: List[str] = field(default_factory=list)
9
+ exclude_patterns: List[str] = field(default_factory=list)
10
+ DEFAULT_ALLOWED_EXTS: Set[str] = {
11
+ ".py", ".pyw", # python
12
+ ".js", ".jsx", ".ts", ".tsx", ".mjs", # JS/TS
13
+ ".html", ".htm", ".xml", # markup
14
+ ".css", ".scss", ".sass", ".less", # styles
15
+ ".json", ".yaml", ".yml", ".toml", ".ini", # configs
16
+ ".cfg", ".md", ".markdown", ".rst", # docs
17
+ ".sh", ".bash", ".env", # scripts/env
18
+ ".txt" # plain text
19
+ }
20
+
21
+ DEFAULT_EXCLUDE_TYPES: Set[str] = {
22
+ "image", "video", "audio", "presentation",
23
+ "spreadsheet", "archive", "executable"
24
+ }
25
+
26
+ # never want these—even if they sneak into ALLOWED
27
+ _unallowed = set(get_media_exts(DEFAULT_EXCLUDE_TYPES)) | {'.bak', '.shp', '.cpg', '.dbf', '.shx','.geojson',".pyc",'.shx','.geojson','.prj','.sbn','.sbx'}
28
+ DEFAULT_UNALLOWED_EXTS = {e for e in _unallowed if e not in DEFAULT_ALLOWED_EXTS}
29
+
30
+ DEFAULT_EXCLUDE_DIRS: Set[str] = {
31
+ "node_modules", "old","__pycache__", "backups", "backup", "backs", "trash", "depriciated", "old", "__init__"
32
+ }
33
+
34
+ DEFAULT_EXCLUDE_PATTERNS: Set[str] = {
35
+ "__init__*", "*.tmp", "*.log", "*.lock", "*.zip","*~"
36
+ }
37
+ REMOTE_RE = re.compile(r"^(?P<host>[^:\s]+@[^:\s]+):(?P<path>/.*)$")
38
+ AllowedPredicate = Optional[Callable[[str], bool]]
39
+ DEFAULT_EXCLUDE_FILE_PATTERNS=DEFAULT_EXCLUDE_PATTERNS
@@ -0,0 +1,10 @@
1
+ from .imports import *
2
+ def get_caller_path():
3
+ i = i or 1
4
+ frame = inspect.stack()[i]
5
+ return os.path.abspath(frame.filename)
6
+ def get_caller_dir(i=None):
7
+ i = i or 1
8
+ frame = inspect.stack()[i]
9
+ abspath = os.path.abspath(frame.filename)
10
+ return os.path.dirname(abspath)
@@ -0,0 +1,39 @@
1
+ # ============================================================
2
+ # abstract_utilities/imports/imports.py
3
+ # Global imports hub — everything imported here will be
4
+ # automatically available to any module that does:
5
+ # from ..imports import *
6
+ # ============================================================
7
+ # ---- Core standard library modules -------------------------
8
+ import os, sys, re, shlex, glob, platform, textwrap, subprocess, inspect, json, time
9
+ import tempfile, shutil, logging, pathlib, fnmatch, importlib, importlib.util, types
10
+ from pathlib import Path
11
+ from datetime import datetime
12
+ from types import ModuleType
13
+
14
+ # ---- Dataclasses and typing --------------------------------
15
+ from dataclasses import dataclass, field
16
+ from typing import (
17
+ Any, Optional, List, Dict, Set, Tuple,
18
+ Iterable, Callable, Literal, Union, TypeVar
19
+ )
20
+
21
+ # ---- Common 3rd-party dependencies --------------------------
22
+ import pandas as pd
23
+ import geopandas as gpd
24
+ import pytesseract
25
+ import pdfplumber
26
+ import PyPDF2
27
+ import ezodf
28
+ from pdf2image import convert_from_path
29
+ from werkzeug.utils import secure_filename
30
+ from werkzeug.datastructures import FileStorage
31
+
32
+ # ---- Helpers ------------------------------------------------
33
+ import textwrap as tw
34
+ from pprint import pprint
35
+
36
+ # ============================================================
37
+ # AUTO-EXPORT ALL NON-PRIVATE NAMES
38
+ # ============================================================
39
+ __all__ = [name for name in globals() if not name.startswith("_")]
@@ -0,0 +1,13 @@
1
+ from .imports import *
2
+ from ....string_clean import eatAll
3
+ from ....list_utils import make_list
4
+ from ....type_utils import get_media_exts, is_media_type, MIME_TYPES, is_str
5
+ from ....ssh_utils import *
6
+ from ....env_utils import *
7
+ from ....read_write_utils import *
8
+ from ....abstract_classes import SingletonMeta
9
+
10
+ from ....class_utils import get_caller, get_caller_path, get_caller_dir
11
+
12
+
13
+ __all__ = [name for name in globals() if not name.startswith("_")]
@@ -1 +1,10 @@
1
1
  from ..imports import *
2
+ from typing import *
3
+ from dataclasses import dataclass, field
4
+ @dataclass
5
+ class ScanConfig:
6
+ allowed_exts: Set[str]
7
+ unallowed_exts: Set[str]
8
+ exclude_types: Set[str]
9
+ exclude_dirs: List[str] = field(default_factory=list)
10
+ exclude_patterns: List[str] = field(default_factory=list)
@@ -0,0 +1,82 @@
1
+ from .imports import *
2
+
3
+
4
+ # --- Base remote checker -----------------------------------------------------
5
+ def _remote_test(path: str, test_flag: str, user_at_host: str, timeout: int = 5) -> bool:
6
+ """
7
+ Run a remote shell test (e.g. -f, -d) via SSH.
8
+ Returns True if test succeeds, False otherwise.
9
+ """
10
+ cmd = f"[ {test_flag} {shlex.quote(path)} ] && echo 1 || echo 0"
11
+ try:
12
+ result = subprocess.check_output(
13
+ ["ssh", user_at_host, cmd],
14
+ stderr=subprocess.DEVNULL,
15
+ text=True,
16
+ timeout=timeout
17
+ ).strip()
18
+ return result == "1"
19
+ except Exception:
20
+ return False
21
+
22
+
23
+ # --- Individual path checks --------------------------------------------------
24
+ def is_remote_file(path: str, user_at_host: str) -> bool:
25
+ """True if remote path is a file."""
26
+ return _remote_test(path, "-f", user_at_host)
27
+
28
+
29
+ def is_remote_dir(path: str, user_at_host: str) -> bool:
30
+ """True if remote path is a directory."""
31
+ return _remote_test(path, "-d", user_at_host)
32
+
33
+
34
+ def is_local_file(path: str) -> bool:
35
+ """True if local path is a file."""
36
+ return os.path.isfile(path)
37
+
38
+
39
+ def is_local_dir(path: str) -> bool:
40
+ """True if local path is a directory."""
41
+ return os.path.isdir(path)
42
+
43
+
44
+ # --- Unified interface -------------------------------------------------------
45
+ def is_file(path: str,*args, user_at_host: Optional[str] = None,**kwargs) -> bool:
46
+ """Determine if path is a file (works local or remote)."""
47
+ if user_at_host:
48
+ return is_remote_file(path, user_at_host)
49
+ return is_local_file(path)
50
+
51
+
52
+ def is_dir(path: str, *args,user_at_host: Optional[str] = None,**kwargs) -> bool:
53
+ """Determine if path is a directory (works local or remote)."""
54
+ if user_at_host:
55
+ return is_remote_dir(path, user_at_host)
56
+ return is_local_dir(path)
57
+
58
+
59
+ # --- Optional: keep your original all-in-one wrapper ------------------------
60
+ def check_path_type(
61
+ path: str,
62
+ user_at_host: Optional[str] = None,
63
+ ) -> str:
64
+ """
65
+ Return 'file', 'directory', 'missing', or 'unknown'.
66
+ Uses isolated is_file/is_dir functions.
67
+ """
68
+ if user_at_host:
69
+ if is_remote_file(path, user_at_host):
70
+ return "file"
71
+ elif is_remote_dir(path, user_at_host):
72
+ return "directory"
73
+ else:
74
+ return "missing"
75
+ else:
76
+ if os.path.isfile(path):
77
+ return "file"
78
+ elif os.path.isdir(path):
79
+ return "directory"
80
+ elif not os.path.exists(path):
81
+ return "missing"
82
+ return "unknown"
@@ -1,5 +1,4 @@
1
1
  from .constants import *
2
- from .imports import *
3
2
  from .module_imports import *
4
3
  from .classes import *
5
- from .file_functions import *
4
+ from .imports import *
@@ -0,0 +1,158 @@
1
+ from abstract_utilities import read_from_file, eatAll
2
+ import os, sys, re, inspect
3
+ from typing import *
4
+
5
+ # ============================================================
6
+ # Constants
7
+ # ============================================================
8
+ import_tag = 'import '
9
+ from_tag = 'from '
10
+
11
+ # ============================================================
12
+ # Helpers
13
+ # ============================================================
14
+ def get_caller_path(i=None):
15
+ i = i or 1
16
+ frame = inspect.stack()[i]
17
+ return os.path.abspath(frame.filename)
18
+
19
+ def make_list(obj: any) -> list:
20
+ if isinstance(obj, str) and ',' in obj:
21
+ obj = obj.split(',')
22
+ if isinstance(obj, (set, tuple)):
23
+ return list(obj)
24
+ if isinstance(obj, list):
25
+ return obj
26
+ return [obj]
27
+
28
+ def eatElse(stringObj, chars=None):
29
+ chars = make_list(chars or []) + list('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_')
30
+ while stringObj:
31
+ if stringObj and stringObj[0] not in chars:
32
+ stringObj = stringObj[1:]
33
+ continue
34
+ if stringObj and stringObj[-1] not in chars:
35
+ stringObj = stringObj[:-1]
36
+ continue
37
+ break
38
+ return stringObj
39
+
40
+ def clean_line(line):
41
+ return eatAll(line, [' ', '', '\t', '\n'])
42
+
43
+ def is_line_import(line):
44
+ return bool(line and line.startswith(import_tag) and 'from ' not in line)
45
+
46
+ def is_line_from_import(line):
47
+ return bool(line and line.startswith(from_tag) and ' import ' in line)
48
+
49
+ def is_from_group_start(line):
50
+ return bool(line and line.startswith(from_tag) and 'import' in line and '(' in line and not line.rstrip().endswith(')'))
51
+
52
+ def is_from_group_end(line):
53
+ return bool(line and ')' in line)
54
+
55
+ def clean_imports(imports):
56
+ if isinstance(imports, str):
57
+ imports = imports.split(',')
58
+ return [eatElse(imp.strip()) for imp in imports if imp.strip()]
59
+
60
+ # ============================================================
61
+ # Combine lone import statements
62
+ # ============================================================
63
+ def combine_lone_imports(text=None, file_path=None):
64
+ text = text or ''
65
+ if file_path and os.path.isfile(file_path):
66
+ text += read_from_file(file_path)
67
+ lines = text.split('\n')
68
+
69
+ cleaned_import_list = []
70
+ nu_lines = []
71
+ j = None
72
+
73
+ for i, line in enumerate(lines):
74
+ if is_line_import(line):
75
+ if j is None:
76
+ nu_lines.append(import_tag)
77
+ j = i
78
+ cleaned_import_list += clean_imports(line.split(import_tag)[1])
79
+ else:
80
+ nu_lines.append(line)
81
+
82
+ if j is None:
83
+ return '\n'.join(nu_lines)
84
+ cleaned_import_list = sorted(set(cleaned_import_list))
85
+ nu_lines[j] += ', '.join(cleaned_import_list)
86
+ return '\n'.join(nu_lines)
87
+
88
+ # ============================================================
89
+ # Merge repeated 'from pkg import ...' (1-line only)
90
+ # Preserve multi-line grouped imports
91
+ # ============================================================
92
+ def merge_from_import_groups(text=None, file_path=None):
93
+ if file_path and os.path.isfile(file_path):
94
+ text = read_from_file(file_path)
95
+ text = text or ''
96
+ lines = text.split('\n')
97
+
98
+ pkg_to_imports: Dict[str, Set[str]] = {}
99
+ pkg_to_line_index: Dict[str, int] = {}
100
+ nu_lines: List[str] = []
101
+
102
+ in_group = False
103
+ for i, line in enumerate(lines):
104
+ stripped = line.strip()
105
+
106
+ # preserve multi-line grouped blocks intact
107
+ if in_group:
108
+ nu_lines.append(line)
109
+ if is_from_group_end(line):
110
+ in_group = False
111
+ continue
112
+
113
+ if is_from_group_start(line):
114
+ in_group = True
115
+ nu_lines.append(line)
116
+ continue
117
+
118
+ if is_line_from_import(line):
119
+ try:
120
+ pkg_part, imps_part = line.split(' import ', 1)
121
+ pkg_name = pkg_part.replace('from ', '').strip()
122
+ imps = clean_imports(imps_part)
123
+ except Exception:
124
+ nu_lines.append(line)
125
+ continue
126
+
127
+ if pkg_name not in pkg_to_imports:
128
+ pkg_to_imports[pkg_name] = set(imps)
129
+ pkg_to_line_index[pkg_name] = len(nu_lines)
130
+ nu_lines.append(line)
131
+ else:
132
+ pkg_to_imports[pkg_name].update(imps)
133
+ else:
134
+ nu_lines.append(line)
135
+
136
+ # Rewrite first occurrences
137
+ for pkg, idx in pkg_to_line_index.items():
138
+ all_imps = sorted(pkg_to_imports[pkg])
139
+ nu_lines[idx] = f"from {pkg} import {', '.join(all_imps)}"
140
+
141
+ return '\n'.join(nu_lines)
142
+
143
+ # ============================================================
144
+ # Pipeline
145
+ # ============================================================
146
+ def clean_imports_pipeline(path: str):
147
+ raw = read_from_file(path)
148
+ step1 = combine_lone_imports(text=raw)
149
+ step2 = merge_from_import_groups(text=step1)
150
+ return step2
151
+
152
+ # ============================================================
153
+ # Standalone Run
154
+ # ============================================================
155
+ if __name__ == "__main__":
156
+ abs_path = "/home/flerb/Documents/pythonTools/modules/src/modules/abstract_utilities/src/abstract_utilities/file_utils/imports/imports.py"
157
+ cleaned = clean_imports_pipeline(abs_path)
158
+ print(cleaned)
@@ -1,5 +1,5 @@
1
1
  from .imports import *
2
- def get_caller_path():
2
+ def get_caller_path(i=None):
3
3
  i = i or 1
4
4
  frame = inspect.stack()[i]
5
5
  return os.path.abspath(frame.filename)
@@ -1,13 +1,65 @@
1
- import pandas as pd
1
+ # ============================================================
2
+ # abstract_utilities/imports/imports.py
3
+ # Global imports hub — everything imported here will be
4
+ # automatically available to any module that does:
5
+ # from ..imports import *
6
+ # ============================================================
7
+
8
+
9
+ import os
10
+ import sys, importlib,os
11
+ import sys, importlib, os, inspect
12
+ from pathlib import Path
13
+ import os,sys
14
+
15
+
16
+
2
17
  from typing import *
18
+ import re
19
+
20
+ from typing import *
21
+ from types import MethodType
22
+ import os,re, sys, importlib, inspect, os, importlib.util, hashlib
23
+ import os,tempfile,shutil,logging,ezodf,fnmatch,pytesseract,pdfplumber
24
+ import pandas as pd
3
25
  import geopandas as gpd
4
- from pathlib import Path
5
- from types import ModuleType
6
26
  from datetime import datetime
7
- from pdf2image import convert_from_path
27
+
28
+ from typing import *
29
+ from werkzeug.utils import secure_filename
30
+ from werkzeug.datastructures import FileStorage
31
+ from pdf2image import convert_from_path # only used for OCR fallback
32
+ # ---- Core standard library modules -------------------------
33
+ import os, sys, re, shlex, glob, platform, textwrap, subprocess, inspect, json, time
34
+ import tempfile, shutil, logging, pathlib, fnmatch, importlib, importlib.util, types
35
+
36
+ from datetime import datetime
37
+ from types import ModuleType
38
+
39
+ # ---- Dataclasses and typing --------------------------------
8
40
  from dataclasses import dataclass, field
41
+ from typing import (
42
+ Any, Optional, List, Dict, Set, Tuple,
43
+ Iterable, Callable, Literal, Union, TypeVar
44
+ )
45
+
46
+ # ---- Common 3rd-party dependencies --------------------------
47
+ import pandas as pd
48
+ import geopandas as gpd
49
+ import pytesseract
50
+ import pdfplumber
51
+ import PyPDF2
52
+ import ezodf
53
+ from pdf2image import convert_from_path
9
54
  from werkzeug.utils import secure_filename
10
55
  from werkzeug.datastructures import FileStorage
11
- import fnmatch, fnmatch,shlex, os, glob, platform, textwrap, pkgutil,time
12
- import tempfile,shutil,logging,ezodf,fnmatch,pytesseract,pdfplumber,re
13
- import textwrap, sys, types, importlib, importlib.util, inspect,PyPDF2
56
+
57
+ # ---- Helpers ------------------------------------------------
58
+ import textwrap as tw
59
+ from pprint import pprint
60
+
61
+ # ============================================================
62
+ # AUTO-EXPORT ALL NON-PRIVATE NAMES
63
+ # ============================================================
64
+ __all__ = [name for name in globals() if not name.startswith("_")]
65
+
@@ -1,10 +1,13 @@
1
+ from .imports import *
1
2
  from ...string_clean import eatAll
2
3
  from ...list_utils import make_list
3
- from ...type_utils import get_media_exts, is_media_type,MIME_TYPES,is_str
4
+ from ...type_utils import get_media_exts, is_media_type, MIME_TYPES, is_str
4
5
  from ...ssh_utils import *
5
6
  from ...env_utils import *
6
7
  from ...read_write_utils import *
7
8
  from ...abstract_classes import SingletonMeta
8
9
  from ...log_utils import get_logFile
9
- from ...class_utils import get_caller,get_caller_path,get_caller_dir
10
- from ...ssh_utils import run_cmd
10
+ from ...class_utils import get_caller, get_caller_path, get_caller_dir
11
+ from ...ssh_utils import run_cmd
12
+
13
+ __all__ = [name for name in globals() if not name.startswith("_")]
@@ -13,7 +13,9 @@ Usage:
13
13
  """
14
14
 
15
15
  import os
16
- from .ssh_utils.utils import run_cmd
16
+ import shlex
17
+ from .ssh_utils.utils import run_cmd,get_print_sudo_cmd,run_local_cmd,run_remote_cmd
18
+ from .file_utils.file_utils.type_checks import is_file,is_dir
17
19
  from .abstract_classes import run_pruned_func
18
20
  _FILE_PATH_KEYS = ['file', 'filepath', 'file_path', 'path', 'directory', 'f', 'dst', 'dest']
19
21
  _CONTENTS_KEYS = ['cont', 'content', 'contents', 'data', 'datas', 'dat', 'src', 'source']
@@ -73,7 +75,73 @@ def check_read_write_params(*args, **kwargs):
73
75
  raise ValueError("Missing file_path argument.")
74
76
  return file_path, contents
75
77
 
78
+ def write_to_path(
79
+ file_path: str,
80
+ contents: str,
81
+ *,
82
+ user_at_host: str = None,
83
+ cwd: str | None = None,
84
+ password=None,
85
+ key=None,
86
+ env_path=None,
87
+ **kwargs
88
+ ) -> str:
89
+ """
90
+ Completely overwrite a file (locally or remotely).
91
+ Supports sudo and password-based remote execution.
92
+ """
93
+
94
+ # sanitize for shell safety
95
+ quoted_path = shlex.quote(file_path)
96
+ quoted_data = shlex.quote(str(contents))
76
97
 
98
+ # shell command that fully overwrites
99
+ # (no append, replaces contents entirely)
100
+ base_cmd = f"echo {quoted_data} > {quoted_path}"
101
+
102
+ # optional sudo password injection
103
+ full_cmd = get_print_sudo_cmd(
104
+ cmd=base_cmd,
105
+ password=password,
106
+ key=key,
107
+ env_path=env_path
108
+ )
109
+
110
+ # local or remote dispatch
111
+ if user_at_host:
112
+ return run_remote_cmd(
113
+ user_at_host=user_at_host,
114
+ cmd=full_cmd,
115
+ cwd=cwd,
116
+ password=password,
117
+ key=key,
118
+ env_path=env_path,
119
+ **kwargs
120
+ )
121
+ else:
122
+ return run_local_cmd(
123
+ cmd=full_cmd,
124
+ cwd=cwd,
125
+ password=password,
126
+ key=key,
127
+ env_path=env_path,
128
+ **kwargs
129
+ )
130
+ ### --- Core functionality -------------------------------------------------------
131
+ ##def write_to_file(*args, **kwargs):
132
+ ## """
133
+ ## Write contents to a file (create if missing).
134
+ ##
135
+ ## Returns the file_path written.
136
+ ## """
137
+ ## file_path, contents = check_read_write_params(*args, **kwargs)
138
+ ## if contents is None:
139
+ ## raise ValueError("Missing contents to write.")
140
+ ##
141
+ ## os.makedirs(os.path.dirname(file_path) or ".", exist_ok=True)
142
+ ## with open(file_path, "w", encoding="utf-8") as f:
143
+ ## f.write(str(contents))
144
+ ## return file_path
77
145
  # --- Core functionality -------------------------------------------------------
78
146
  def write_to_file(*args, **kwargs):
79
147
  """
@@ -84,6 +152,17 @@ def write_to_file(*args, **kwargs):
84
152
  file_path, contents = check_read_write_params(*args, **kwargs)
85
153
  if contents is None:
86
154
  raise ValueError("Missing contents to write.")
155
+ user_at_host = kwargs.get("user_at_host")
156
+ if user_at_host:
157
+ kwargs["cwd"] = kwargs.get('cwd') or os.path.dirname(file_path)
158
+ # sanitize for shell safety
159
+ quoted_path = shlex.quote(file_path)
160
+ quoted_data = shlex.quote(str(contents))
161
+ # shell command that fully overwrites
162
+ # (no append, replaces contents entirely)
163
+ kwargs["cmd"] = f"echo {quoted_data} > {quoted_path}"
164
+ return run_pruned_func(run_cmd,**kwargs)
165
+
87
166
 
88
167
  os.makedirs(os.path.dirname(file_path) or ".", exist_ok=True)
89
168
  with open(file_path, "w", encoding="utf-8") as f:
@@ -1,12 +1,3 @@
1
- import os,tempfile,shutil,logging,ezodf,fnmatch,pytesseract,pdfplumber
2
- import pandas as pd
3
- import geopandas as gpd
4
- from datetime import datetime
5
- from pathlib import Path
6
- from typing import *
7
- from werkzeug.utils import secure_filename
8
- from werkzeug.datastructures import FileStorage
9
- from pdf2image import convert_from_path # only used for OCR fallback
10
1
  from ...abstract_classes import SingletonMeta
11
2
  from ..pdf_utils import *
12
3
  from ...read_write_utils import *
@@ -4,3 +4,4 @@ from .import_utils import *
4
4
  from .sysroot_utils import *
5
5
  from .utils import *
6
6
  from .safe_import_utils import *
7
+ from .clean_imports import *
@@ -0,0 +1,175 @@
1
+ from ...read_write_utils import read_from_file,write_to_file
2
+ from ...string_clean import eatAll,eatElse,clean_line
3
+ from ...class_utils import get_caller_path
4
+ from ...list_utils import make_list
5
+ import os
6
+ import_tag = 'import '
7
+ from_tag = 'from '
8
+ def get_text_or_read(text=None,file_path=None):
9
+ text = text or ''
10
+ imports_js = {}
11
+ if not text and file_path and os.path.isfile(file_path):
12
+ text=read_from_file(file_path)
13
+ return text
14
+ def is_line_import(line):
15
+ if line and (line.startswith(from_tag) or line.startswith(import_tag)):
16
+ return True
17
+ return False
18
+ def is_line_group_import(line):
19
+ if line and (line.startswith(from_tag) and import_tag in line):
20
+ return True
21
+ return False
22
+ def get_import_pkg(line):
23
+ if is_line_group_import(line):
24
+ return clean_line(line.split(from_tag)[1].split(import_tag)[0])
25
+ def get_imports_from_import_pkg(line):
26
+ if is_line_group_import(line):
27
+ return get_cleaned_import_list(line,commaClean=True)
28
+
29
+ def add_imports_to_import_pkg_js(import_pkg,imports,import_pkg_js=None):
30
+ import_pkg_js = import_pkg_js or {}
31
+ imports = clean_imports(imports)
32
+ if import_pkg not in import_pkg_js:
33
+ i = len(import_pkg_js["nulines"])
34
+ import_pkg_js[import_pkg]={"imports":imports,"line":i}
35
+ import_line = f"from {import_pkg} import "
36
+ if import_pkg == "import":
37
+ import_line = import_tag
38
+ import_pkg_js["nulines"].append(import_line)
39
+ else:
40
+ import_pkg_js[import_pkg]["imports"]+=imports
41
+ return import_pkg_js
42
+ def update_import_pkg_js(line,import_pkg_js=None):
43
+ import_pkg_js = import_pkg_js or {}
44
+ if is_line_group_import(line):
45
+ import_pkg = get_import_pkg(line)
46
+ imports = get_imports_from_import_pkg(line)
47
+ import_pkg_js = add_imports_to_import_pkg_js(import_pkg,imports,import_pkg_js=import_pkg_js)
48
+ else:
49
+ if len(import_pkg_js["nulines"]) >0 and line == '' and is_line_import(import_pkg_js["nulines"][-1]):
50
+ pass
51
+ else:
52
+ import_pkg_js["nulines"].append(line)
53
+ return import_pkg_js
54
+ def is_from_line_group(line):
55
+ if line and line.startswith(from_tag) and import_tag in line and '(' in line:
56
+ import_spl = line.split(import_tag)[-1]
57
+ import_spl_clean = clean_line(line)
58
+ if not import_spl_clean.endswith(')'):
59
+ return True
60
+ return False
61
+ def clean_imports(imports,commaClean=True):
62
+ chars=["*"]
63
+ if not commaClean:
64
+ chars.append(',')
65
+ if isinstance(imports,str):
66
+ imports = imports.split(',')
67
+ return [eatElse(imp,chars=chars) for imp in imports if imp]
68
+ def get_cleaned_import_list(line,commaClean=True):
69
+ cleaned_import_list=[]
70
+ if import_tag in line:
71
+ imports = line.split(import_tag)[1]
72
+ cleaned_import_list+=clean_imports(imports,commaClean=commaClean)
73
+ return cleaned_import_list
74
+ def get_all_imports(text=None,file_path=None,import_pkg_js=None):
75
+ text = get_text_or_read(text=text,file_path=file_path)
76
+ lines = text.split('\n')
77
+ cleaned_import_list=[]
78
+ nu_lines = []
79
+ is_from_group = False
80
+ import_pkg_js = import_pkg_js or {}
81
+ if "nulines" not in import_pkg_js:
82
+ import_pkg_js["nulines"]=[]
83
+ if "file_path" not in import_pkg_js:
84
+ import_pkg_js["file_path"]=file_path
85
+ if "all_data" not in import_pkg_js:
86
+ import_pkg_js["all_data"]=[]
87
+ if file_path and file_path != import_pkg_js["file_path"]:
88
+ found=False
89
+ nu_data = {"file_path":import_pkg_js["file_path"],"nulines":import_pkg_js["nulines"]}
90
+ for i,data in enumerate(import_pkg_js["all_data"]):
91
+ if data.get('file_path') == import_pkg_js["file_path"]:
92
+ import_pkg_js["all_data"][i] = nu_data
93
+ found = True
94
+ break
95
+ if found == False:
96
+ import_pkg_js["all_data"].append(nu_data)
97
+ import_pkg_js["nulines"]=[]
98
+ import_pkg_js["file_path"]=file_path
99
+
100
+ for line in lines:
101
+ if line.startswith(import_tag) and ' from ' not in line:
102
+ cleaned_import_list = get_cleaned_import_list(line)
103
+ import_pkg_js = add_imports_to_import_pkg_js("import",cleaned_import_list,import_pkg_js=import_pkg_js)
104
+ else:
105
+ if is_from_group:
106
+ import_pkg=is_from_group
107
+ line = clean_line(line)
108
+ if line.endswith(')'):
109
+ is_from_group=False
110
+ line=line[:-1]
111
+ imports_from_import_pkg = clean_imports(line)
112
+ import_pkg_js = add_imports_to_import_pkg_js(import_pkg,imports_from_import_pkg,import_pkg_js=import_pkg_js)
113
+
114
+ else:
115
+ import_pkg_js=update_import_pkg_js(line,import_pkg_js=import_pkg_js)
116
+ if is_from_line_group(line) and is_from_group == False:
117
+ is_from_group=get_import_pkg(line)
118
+ return import_pkg_js
119
+ def clean_all_imports(text=None,file_path=None,import_pkg_js=None):
120
+ if not import_pkg_js:
121
+ import_pkg_js = get_all_imports(text=text,file_path=file_path)
122
+ nu_lines = import_pkg_js["nulines"]
123
+ for pkg,values in import_pkg_js.items():
124
+ comments = []
125
+ if pkg not in ["nulines","file_path","all_data"]:
126
+ line = values.get('line')
127
+ imports = values.get('imports')
128
+ for i,imp in enumerate(imports):
129
+ if '#' in imp:
130
+ imp_spl = imp.split('#')
131
+ comments.append(imp_spl[-1])
132
+ imports[i] = clean_line(imp_spl[0])
133
+ imports = list(set(imports))
134
+ if '*' in imports:
135
+ imports="*"
136
+ else:
137
+ imports=','.join(imports)
138
+ if comments:
139
+ comments=','.join(comments)
140
+ imports+=f" #{comments}"
141
+ import_pkg_js[pkg]["imports"]=imports
142
+ nu_lines[line] += imports
143
+ import_pkg_js["nulines"]=nu_lines
144
+ return import_pkg_js
145
+
146
+ def get_all_real_imps(file):
147
+ contents = read_from_file(file)
148
+ lines = contents.split('\n')
149
+ for line in lines:
150
+ if line.startswith('from '):
151
+ from_line = line.split('from ')[-1]
152
+ dot_fro = ""
153
+ dirname = file
154
+ for char in from_line:
155
+ if char != '.':
156
+ line = f"from {dot_fro}{eatAll(from_line,'.')}"
157
+ if line in all_imps:
158
+ line = ""
159
+ break
160
+ if dot_fro == "":
161
+ dot_fro = ""
162
+ dirname = os.path.dirname(dirname)
163
+ dirbase = os.path.basename(dirname)
164
+ dot_fro = f"{dirbase}.{dot_fro}"
165
+ if line:
166
+ all_imps.append(line)
167
+
168
+ return '\n'.join(all_imps)
169
+ def save_cleaned_imports(text=None,file_path=None,write=False,import_pkg_js=None):
170
+ import_pkg_js=get_all_imports(text=text,file_path=file_path,import_pkg_js=import_pkg_js)
171
+ import_pkg_js = clean_all_imports(text=text,file_path=file_path,import_pkg_js=import_pkg_js)
172
+ contents = '\n'.join(import_pkg_js["nulines"])
173
+ if file_path and write:
174
+ write_to_file(contents=contents,file_path=file_path)
175
+ return contents
@@ -22,6 +22,8 @@ Date: 05/31/2023
22
22
  Version: 0.1.2
23
23
  """
24
24
  import os
25
+ from .list_utils import make_list
26
+ from .type_utils import get_alpha_ints
25
27
  def quoteIt(st: str, ls: list) -> str:
26
28
  """
27
29
  Quotes specific elements in a string.
@@ -110,6 +112,42 @@ def eatAll(string: str, list_objects:(str or list)) -> any:
110
112
  if string and list_objects:
111
113
  string = eatOuter(string, list_objects)
112
114
  return string
115
+
116
+
117
+
118
+ def eatElse(
119
+ stringObj,
120
+ chars=None,
121
+ ints=True,
122
+ alpha=True,
123
+ lower=True,
124
+ capitalize=True,
125
+ string=True,
126
+ listObj=True
127
+ ):
128
+ alpha_ints = get_alpha_ints(
129
+ ints=True,
130
+ alpha=True,
131
+ lower=True,
132
+ capitalize=True,
133
+ string=True,
134
+ listObj=True
135
+ )
136
+ chars = make_list(chars or [])+alpha_ints
137
+
138
+ while True:
139
+ if stringObj:
140
+ str_0 = stringObj[0] not in chars
141
+ str_1 = stringObj[-1] not in chars
142
+ str_eat = str_0 or str_1
143
+ if not str_eat:
144
+ return stringObj
145
+ if stringObj and str_0:
146
+ stringObj = stringObj[1:] if len(stringObj) !=1 else ""
147
+ if stringObj and str_1:
148
+ stringObj = stringObj[:-1] if len(stringObj) !=1 else ""
149
+ else:
150
+ return stringObj
113
151
  def safe_split(obj, ls):
114
152
  """
115
153
  Safely splits a string using multiple delimiters.
@@ -185,6 +223,7 @@ def url_join(*paths):
185
223
  final_path = f"{final_path}/{path}"
186
224
  return final_path
187
225
 
188
-
226
+ def clean_line(line):
227
+ return eatAll(line,[' ','','\t','\n'])
189
228
  def capitalize(string):
190
229
  return string[:1].upper() + string[1:].lower() if string else string
@@ -1,3 +1,39 @@
1
+ from .list_utils import make_list
2
+ def get_from_kwargs(*args,**kwargs):
3
+ values = {}
4
+ for key in args:
5
+ if key:
6
+ key = str(key)
7
+ if key in kwargs:
8
+ values[key] = kwargs.get(key)
9
+ del kwargs[key]
10
+ return values,kwargs
11
+ def replace_it(string,item,rep):
12
+ if item in string:
13
+ string = string.replace(item,rep)
14
+ return string
15
+ def while_replace(string,item,rep):
16
+ while True:
17
+ string = replace_it(string,item,rep)
18
+ if item not in string or item in rep:
19
+ return string
20
+ def for_replace(string,item,replace):
21
+ replace = make_list(replace)
22
+ for rep in replace:
23
+ string = while_replace(string,item,rep)
24
+ return string
25
+ def replace_all(string,*args,**kwargs):
26
+ for items in args:
27
+ if items and isinstance(items,list):
28
+ item = items[0]
29
+ replace = items[1:] if len(items)>1 else items[-1]
30
+ string = for_replace(string,item,replace)
31
+ values,kwargs = get_from_kwargs('item','replace',**kwargs)
32
+ if values:
33
+ string = for_replace(string,**values)
34
+ for item,replace in kwargs.items():
35
+ string = for_replace(string,item,rep)
36
+ return string
1
37
  def get_lines(string,strip=True):
2
38
  lines = string.split('\n')
3
39
  if strip:
@@ -60,6 +60,7 @@ import os
60
60
  from pathlib import Path
61
61
  from typing import Union
62
62
  from .list_utils import make_list
63
+
63
64
  # A big, but by no means exhaustive, map of extensions to mime‐types by category:
64
65
  MIME_TYPES = {
65
66
  'image': {
@@ -936,7 +937,30 @@ def is_any_instance(value):
936
937
  for each in [dict, list, int, float]:
937
938
  if is_instance(value, each):
938
939
  return True
939
-
940
+ def getAlphas(lower=True,capitalize=False,listObj=False):
941
+ obj = ''
942
+ alphas = 'abcdefghijklmoprstuvwxyz'
943
+ if lower:
944
+ obj+=alphas
945
+ if capitalize:
946
+ obj+=alphas.upper()
947
+ if listObj:
948
+ obj = list(obj)
949
+ return obj
950
+ def getInts(string=False,listObj=False):
951
+ obj=12345678909
952
+ if string:
953
+ obj = str(obj)
954
+ if listObj:
955
+ obj = list(obj)
956
+ return obj
957
+ def get_alpha_ints(ints=True,alpha=True,lower=True,capitalize=True,string=True,listObj=True):
958
+ objs = [] if listObj else ""
959
+ if ints:
960
+ objs+=getInts(string=string,listObj=listObj)
961
+ if alpha:
962
+ objs+=getAlphas(lower=lower,capitalize=capitalize,listObj=listObj)
963
+ return objs
940
964
  # Function: is_number
941
965
  # Function: is_str
942
966
  # Function: is_int
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstract_utilities
3
- Version: 0.2.2.453
3
+ Version: 0.2.2.476
4
4
  Summary: abstract_utilities is a collection of utility modules providing a variety of functions to aid in tasks such as data comparison, list manipulation, JSON handling, string manipulation, mathematical computations, and time operations.
5
5
  Home-page: https://github.com/AbstractEndeavors/abstract_utilities
6
6
  Author: putkoff
@@ -1,6 +1,6 @@
1
- abstract_utilities/__init__.py,sha256=aLWUTfocuGa7qoz3Czzvuz0xUNoy7DojHhp2MN5vyPk,5198
1
+ abstract_utilities/__init__.py,sha256=OWG_j_7hFAoQXmi_hwHQg8vSufDSAatj8iax78ZYAJc,5229
2
2
  abstract_utilities/abstract_classes.py,sha256=A6-FNDQb2P_jcyt01Kc5SuY2QawLVKNjQ-rDGfsn4rA,2461
3
- abstract_utilities/class_utils.py,sha256=YMQgeTHSMo2C13G0JRgQIgbx131jb-PHdDrIqt71FsE,13664
3
+ abstract_utilities/class_utils.py,sha256=AJe6kIiAwmr_is458EkKsjH2c0pyIiZNkah2gBXzXAE,13663
4
4
  abstract_utilities/collator_utils.py,sha256=9exNoZAr9rABGYTwZOn7hdLbpnMtRd2AgfU7yjZrXGw,2348
5
5
  abstract_utilities/doit.py,sha256=a1zkyMJbSGPvE-OmCQcH_dQyLME392UfvQmGztOWyhE,1646
6
6
  abstract_utilities/dynimport.py,sha256=BTX33OXfUq4LAuT1RAzLhbtxqf7CTm5WHYdvVAH83nc,6584
@@ -14,14 +14,14 @@ abstract_utilities/log_utils.py,sha256=W74Y-CmdQP4Kj88HmAgejVxWgyWlvgCKMwLvOfyFf
14
14
  abstract_utilities/math_utils.py,sha256=0o1ls1En03UAkYmxTBildCCJDfHygmNuvVnrNrLYtK0,6578
15
15
  abstract_utilities/parse_utils.py,sha256=Z5OGRwHuzCzY91fz0JJojk1BPAo1XF2quNNLuBF4_Vk,18602
16
16
  abstract_utilities/path_utils.py,sha256=X_U9cPBbNu5Wi0F3hQE0gXQX1gfhzxhxALbairTEOZU,19252
17
- abstract_utilities/read_write_utils.py,sha256=oPmY0UZSuEkV_ox8inZiSG_adYGm6J9n6-lgFNytdi0,4470
17
+ abstract_utilities/read_write_utils.py,sha256=S8Sj0mtErRze9uOOzdWl2ZreREdXKKQMbyQKC75c_Vc,6921
18
18
  abstract_utilities/safe_utils.py,sha256=_uoZny6dJjopVakOiaf0UIZcvRRXMh51FpfDUooe0xY,3733
19
- abstract_utilities/string_clean.py,sha256=-gY9i2yqjX5UClvSaKsSrzA4GjR7eaNI3GnFjZpt2bo,5923
20
- abstract_utilities/string_utils.py,sha256=02xdIEDySWEexrtY3skBYOdeDmr3XgE5j1nqAeAv7w8,352
19
+ abstract_utilities/string_clean.py,sha256=oQv85J-mA4sP2NJwbTI-1k0RXw7V0AmqZolYaAZvex4,6916
20
+ abstract_utilities/string_utils.py,sha256=ElDfw6lW-0UxhHUml3YFvSapEEx_3F-jabpieBsFQPw,1563
21
21
  abstract_utilities/tetsts.py,sha256=PrejTUew5dAAqNb4erMJwfdSHxDyuuHGWY2fMlWk5hk,21
22
22
  abstract_utilities/thread_utils.py,sha256=LhE1ylSuOKkkMErBf6SjZprjO_vfh3IKfvNKJQiCxho,5460
23
23
  abstract_utilities/time_utils.py,sha256=yikMjn7i-OBKfmOujfNtDz4R0VTMgi3dfQNrCIZUbQU,13052
24
- abstract_utilities/type_utils.py,sha256=1gpwfG5ze8dTUi7IXnMc65vHrw8XgI0F8m6x4esZavI,26977
24
+ abstract_utilities/type_utils.py,sha256=XaaAel9hUKeOzBqSCqJsIC6UiPMXUlhtmU77jOHz8Ek,27676
25
25
  abstract_utilities/utils.py,sha256=SCa_-x_wsWrcokQXKwlhalxndxLn5Wg25-zqRdJUmag,185049
26
26
  abstract_utilities/cmd_utils/__init__.py,sha256=StTaaB9uzJexvr4TFGVqp_o0_s9T6rQlE3fOZtb_y_0,51
27
27
  abstract_utilities/cmd_utils/cmd_utils.py,sha256=n2DEo91J8LWuIJoSoDkWdApUY_8mHrUW3kjEjjF34Io,7876
@@ -41,31 +41,39 @@ abstract_utilities/env_utils/imports/imports.py,sha256=ZrGEf-J2lyVbb4MrNBX3DwHR0
41
41
  abstract_utilities/env_utils/imports/utils.py,sha256=oB7WhIm_-cHLrUHRXypZGCdWUtNRyePaVO5_kq5Cv84,4490
42
42
  abstract_utilities/file_utils/__init__.py,sha256=I4md5xU5nuBuKyxumvKmnrR0-UgBePX9QfY-QNS-Zso,101
43
43
  abstract_utilities/file_utils/req.py,sha256=CsdGHAWIHOLqjzyoOSZ7XYbNciVYnTgaUs5qOCHttE0,11837
44
- abstract_utilities/file_utils/file_utils/__init__.py,sha256=FjtDxrP7FGqSz6iF8zp_VJdtrWpTnEZmDO2JMUrqV9w,188
44
+ abstract_utilities/file_utils/file_utils/__init__.py,sha256=WOsWvRf7lomRoS80xT1n-R0jvbyHsxPXMsdoPAN62cc,215
45
45
  abstract_utilities/file_utils/file_utils/file_filters.py,sha256=khfbonAPEAhW1wxfFo0I4dawYPCrIKEjNc7VKb1RvzA,3437
46
46
  abstract_utilities/file_utils/file_utils/file_reader.py,sha256=2MRj2PGKq4C-iKL8dmhHwWnhmA8GPVsNaWkTREOF9vo,24545
47
- abstract_utilities/file_utils/file_utils/file_utils.py,sha256=2aVuD0sB-P2gmo_kUsE11aHc6WzLvHUAerMkmy3y9vk,7751
47
+ abstract_utilities/file_utils/file_utils/file_utils.py,sha256=tVBhh1ZQYK-Iq-x5JL4ScS8rYQ7AOP8ezIDFgYs86Ds,7705
48
48
  abstract_utilities/file_utils/file_utils/filter_params.py,sha256=NF692W0cBhEsbtmaVzb8EKMAasasHDElSRaC9fnzYwE,3382
49
- abstract_utilities/file_utils/file_utils/find_collect.py,sha256=RgH8Xr7yNqojvJeOfth8Ub9YPX34hnMPwsZe0uFps1M,4690
50
- abstract_utilities/file_utils/file_utils/imports.py,sha256=SXCMBuHUwqXbfRBk4LjKehsBKZa8-Po5UfEcNTwn4Es,24
49
+ abstract_utilities/file_utils/file_utils/find_collect.py,sha256=bPM7EDrNHlvwZx7CP3AWPNNybzE3AXCSfoMwh6uDHWo,4703
50
+ abstract_utilities/file_utils/file_utils/imports.py,sha256=rF3zdWY98UKuSPwzEzhG0H4cfIVjLqCW3FwsGqFeakE,319
51
51
  abstract_utilities/file_utils/file_utils/map_utils.py,sha256=B_MlkLP8s-o0yU0R3Y2LcTpBntBzysJO18qq181xz9c,1043
52
52
  abstract_utilities/file_utils/file_utils/pdf_utils.py,sha256=D_wg8h-SapCvqinxRIKxMri1jWZNpr5jGvKq9EJePfY,10335
53
- abstract_utilities/file_utils/imports/__init__.py,sha256=VWN_3t0gRSYCalXI0nRLEUB3O2kbqA_Y8wnFq_m5F7A,131
53
+ abstract_utilities/file_utils/file_utils/type_checks.py,sha256=S1k5lDM1Qd5g1FE_KqIE1aWexsFI0Af9droRI6qVb30,2576
54
+ abstract_utilities/file_utils/file_utils/imports/__init__.py,sha256=Mip2n-nY1PLvaWtwTeVs0rdVd6J3_jfwKmIyGYxf9Vo,72
55
+ abstract_utilities/file_utils/file_utils/imports/constants.py,sha256=eIeSj48vtfa8CTYKuuZXbgJQepBrMracfVguaSuN41U,1626
56
+ abstract_utilities/file_utils/file_utils/imports/file_functions.py,sha256=25yta20DDsdgenXYjpm4Ma3Fd6WK9Q16EjyhcZubDFg,291
57
+ abstract_utilities/file_utils/file_utils/imports/imports.py,sha256=nLtDCj-E9htQ1rbbISevHSqviUGCxgCoTZ7KTAQrCpU,1488
58
+ abstract_utilities/file_utils/file_utils/imports/module_imports.py,sha256=pvRkjtWxQ9R4TisCKMQ9asDak63Y9eMGbpCB7DsEyqs,453
59
+ abstract_utilities/file_utils/imports/__init__.py,sha256=PRJBiiPT7oElD3RvHTW80Xd5rIIMdzGN23FD5IkszDI,101
54
60
  abstract_utilities/file_utils/imports/classes.py,sha256=zw16D_h5AxJiks4ydbqkWkXVfvgmE-BpiC4eKInY_KI,12259
61
+ abstract_utilities/file_utils/imports/clean_imps.py,sha256=DB_NEKR8YLla5qCkTMuNscMoTnipEm3nCWnaH8wqQDc,5287
55
62
  abstract_utilities/file_utils/imports/constants.py,sha256=eIeSj48vtfa8CTYKuuZXbgJQepBrMracfVguaSuN41U,1626
56
- abstract_utilities/file_utils/imports/file_functions.py,sha256=25yta20DDsdgenXYjpm4Ma3Fd6WK9Q16EjyhcZubDFg,291
57
- abstract_utilities/file_utils/imports/imports.py,sha256=e1G_ssLBvhde0DDVXnUhqG5TCOMY2z_bKDcFXjWLoLM,537
58
- abstract_utilities/file_utils/imports/module_imports.py,sha256=25jhS0ZZL4y3h47yy5vNjxDqhusgSAIePCy5N-busl0,419
63
+ abstract_utilities/file_utils/imports/file_functions.py,sha256=brQha7TV9DaJe-hZSuHoFZBUI_45hxrGOIBTAojPWU8,297
64
+ abstract_utilities/file_utils/imports/imports.py,sha256=eDvLMtTQlExI1z7ddnPYoXWyrYtp48JuiAzBPqL5wWA,2057
65
+ abstract_utilities/file_utils/imports/module_imports.py,sha256=BROjglIl217zEuU0kwRilkK9vLrYC9e44AS5HS8HwD0,513
59
66
  abstract_utilities/robust_reader/__init__.py,sha256=4i6qW4lwhdYuoO5-p9Xbt8Lpmr3hzCh9Rgb9y19QJwk,28
60
67
  abstract_utilities/robust_reader/file_reader2.py,sha256=U-5opkLu-bct091Eb-5CiNBTf0UFoSITYi8zR-Sz38w,25077
61
68
  abstract_utilities/robust_reader/file_readers.py,sha256=U-5opkLu-bct091Eb-5CiNBTf0UFoSITYi8zR-Sz38w,25077
62
69
  abstract_utilities/robust_reader/sadfsad.py,sha256=gH2ebI9KfiYFv78jzPGk8WPST_FGtojnd_yDwrcvQoM,25282
63
70
  abstract_utilities/robust_reader/imports/__init__.py,sha256=mp6T1rBZdOzj0IDkvlteTqtyKJiOZaJTlgrjTdHO1Qw,23
64
- abstract_utilities/robust_reader/imports/imports.py,sha256=Dw5k9nPfDalmSZmt5mNfV38soBIsLJtsH5wmnQ6sbTI,459
71
+ abstract_utilities/robust_reader/imports/imports.py,sha256=4pqr_mOX7s5YFC3UekLlA7eakBgq_wACq2FYBlwCiec,106
65
72
  abstract_utilities/robust_readers/__init__.py,sha256=_1vhOG1FJnfrRK0ubkT1v6U6udHMIk3qiy1qajL1IiM,55
66
73
  abstract_utilities/robust_readers/imports.py,sha256=FtNxdPoLeeNycDnl-6rBGxBfYjhQ7VhmI5guj8XKFcU,355
67
74
  abstract_utilities/robust_readers/initFuncGen.py,sha256=nrQn1KpSlPNKoOngN1uizVwNMA4llrcd8aGKqlzpXzI,5436
68
- abstract_utilities/robust_readers/import_utils/__init__.py,sha256=hKYj8irPXAN-gIm0frFd0_8fnUNQraWEVugRUrSjcLw,166
75
+ abstract_utilities/robust_readers/import_utils/__init__.py,sha256=0XaHXUzvgMjSV-4VXcBB-sLcXzL3U3ssHZ95YkvgS9w,195
76
+ abstract_utilities/robust_readers/import_utils/clean_imports.py,sha256=eQo7UvO9jiMY7ncFpHyT-BFLNvov6QA4IRoP7MITuls,7228
69
77
  abstract_utilities/robust_readers/import_utils/dot_utils.py,sha256=pmwnY461mOnDjIjgHD6H9MhQXFaF-q8kWerJDgJ1DuI,2364
70
78
  abstract_utilities/robust_readers/import_utils/function_utils.py,sha256=Q9NKvRov3uAaz2Aal3d6fb_opWNXHF9C8GSKOjgfO8Y,1622
71
79
  abstract_utilities/robust_readers/import_utils/import_utils.py,sha256=l0GYdtj5FEYX2yknL-8ru7_U2Sp9Hi1NpegqWPLRMc8,11705
@@ -78,7 +86,7 @@ abstract_utilities/ssh_utils/classes.py,sha256=3Q9BfLpyagNFYyiF4bt-5UCezeUJv9NK9
78
86
  abstract_utilities/ssh_utils/imports.py,sha256=oX8WAv-pkhizzko_h3fIUp9Vhsse4nR7RN2vwONxIx0,317
79
87
  abstract_utilities/ssh_utils/pexpect_utils.py,sha256=JBdOIXBTXAqE5TrsFjmPWJgwSaWyRJN8rbJ6y3_zKPY,10556
80
88
  abstract_utilities/ssh_utils/utils.py,sha256=smUWAx3nW1h0etTndJ_te9bkUX5YzQ8kYd9_gD1TXLk,4882
81
- abstract_utilities-0.2.2.453.dist-info/METADATA,sha256=EJOG3Lfv6HDGuD6MR_F0YR2t6L-TAwRZ5RHovDPfKJk,28108
82
- abstract_utilities-0.2.2.453.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
83
- abstract_utilities-0.2.2.453.dist-info/top_level.txt,sha256=BF0GZ0xVFfN1K-hFIWPO3viNsOs1sSF86n1vHBg39FM,19
84
- abstract_utilities-0.2.2.453.dist-info/RECORD,,
89
+ abstract_utilities-0.2.2.476.dist-info/METADATA,sha256=4vgPx6ciV6eiuiUxluheuDUAxNFTgwQfS2743hc2_IE,28108
90
+ abstract_utilities-0.2.2.476.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
91
+ abstract_utilities-0.2.2.476.dist-info/top_level.txt,sha256=BF0GZ0xVFfN1K-hFIWPO3viNsOs1sSF86n1vHBg39FM,19
92
+ abstract_utilities-0.2.2.476.dist-info/RECORD,,