abstract-utilities 0.2.2.421__py3-none-any.whl → 0.2.2.423__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.

@@ -6,7 +6,7 @@ from typing import Any, Callable, Iterable, Optional
6
6
  import inspect, sys
7
7
  from importlib import import_module
8
8
  from .type_utils import make_list
9
- from .robust_readers import get_for_all_tabs,call_for_all_tabs
9
+ from .file_utils import get_for_all_tabs,call_for_all_tabs
10
10
  class _LazyAttr:
11
11
  """Lazy resolver proxy to avoid import-time cycles.
12
12
  First use triggers actual import & attribute lookup.
@@ -1,7 +1,7 @@
1
1
  from .imports import *
2
+ # -------- Public API drop-ins that mirror your originals --------
2
3
  from .filter_params import *
3
-
4
-
4
+ from .file_filters import *
5
5
  # -------------------------------------------------------------
6
6
  # Wrapper: respects your original API and naming conventions
7
7
  # -------------------------------------------------------------
@@ -28,15 +28,17 @@ def get_globs(items, recursive: bool = True, allowed=None, **kwargs):
28
28
  glob_paths = []
29
29
  roots = [p for p in make_list(items) if p]
30
30
 
31
- kwargs.setdefault("mindepth", 1)
31
+ kwargs.setdefault("mindepth", 0)
32
32
  if not recursive:
33
33
  kwargs.setdefault("maxdepth", 1)
34
-
34
+
35
35
  for fs, root, _ in normalize_items(roots, **kwargs):
36
36
  # use the backend's recursive walker
37
37
  nu_items = fs.glob_recursive(root, **kwargs)
38
38
  if allowed:
39
+
39
40
  nu_items = [n for n in nu_items if n and allowed(n)]
41
+
40
42
  glob_paths += nu_items
41
43
  return glob_paths
42
44
 
@@ -131,7 +133,7 @@ def get_all_allowed_dirs(items, allowed=None, **kwargs):
131
133
  # Unified directory scan
132
134
  # -------------------------------------------------------------
133
135
  def get_files_and_dirs(
134
- directory: str=None,
136
+ directory: str,
135
137
  cfg: Optional["ScanConfig"] = None,
136
138
  allowed_exts: Optional[Set[str]] = False,
137
139
  unallowed_exts: Optional[Set[str]] = False,
@@ -141,7 +143,6 @@ def get_files_and_dirs(
141
143
  add=False,
142
144
  recursive: bool = True,
143
145
  include_files: bool = True,
144
- roots=None,
145
146
  **kwargs
146
147
  ):
147
148
  """
@@ -159,8 +160,7 @@ def get_files_and_dirs(
159
160
  allowed = make_allowed_predicate(cfg)
160
161
  items = []
161
162
  files = []
162
- roots = make_list(roots)
163
- directory = make_list(directory)+roots
163
+ input(allowed)
164
164
  if recursive:
165
165
  items = get_globs(directory, recursive=recursive, allowed=allowed, **kwargs)
166
166
  else:
@@ -1 +1,11 @@
1
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)
11
+
@@ -324,15 +324,6 @@ def apply_inits(ROOT):
324
324
 
325
325
  write_to_file(contents=init_funcs_src, file_path=os.path.join(ROOT, "initFuncs.py"))
326
326
 
327
- def get_caller_path():
328
- i = i or 1
329
- frame = inspect.stack()[i]
330
- return os.path.abspath(frame.filename)
331
- def get_caller_dir(i=None):
332
- i = i or 1
333
- frame = inspect.stack()[i]
334
- abspath = os.path.abspath(frame.filename)
335
- return os.path.dirname(abspath)
336
327
  def call_for_all_tabs():
337
328
  root = get_caller_dir(2)
338
329
  get_for_all_tabs(root)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstract_utilities
3
- Version: 0.2.2.421
3
+ Version: 0.2.2.423
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
@@ -3,7 +3,7 @@ abstract_utilities/abstract_classes.py,sha256=A6-FNDQb2P_jcyt01Kc5SuY2QawLVKNjQ-
3
3
  abstract_utilities/class_utils.py,sha256=-YHkdbaChRIz9YLXJlFF4m7VkdwUCts_HOUbKXxkrYA,12735
4
4
  abstract_utilities/collator_utils.py,sha256=9exNoZAr9rABGYTwZOn7hdLbpnMtRd2AgfU7yjZrXGw,2348
5
5
  abstract_utilities/doit.py,sha256=a1zkyMJbSGPvE-OmCQcH_dQyLME392UfvQmGztOWyhE,1646
6
- abstract_utilities/dynimport.py,sha256=vJJhQdKtE3XXABFOcdfYO8e8pSOnPBfps6gcH5r2DJ0,6988
6
+ abstract_utilities/dynimport.py,sha256=vGNALk6vbbXSANk1akzj9bO3xLLItAWXjNrrO2VCCg8,6984
7
7
  abstract_utilities/error_utils.py,sha256=dSMIM3TKe4e9i_akObyjDwy3Zu4fnoWRK9hucg_ryZo,890
8
8
  abstract_utilities/global_utils.py,sha256=UkCS1nE561bVbxWsH-YQdFPSeZFMYXV7xg-DAtGUvrI,2204
9
9
  abstract_utilities/hash_utils.py,sha256=u7t209ERD9aGONZHqmkYtiQRRadD2qG5ICSTxlYlZMc,206
@@ -38,13 +38,13 @@ abstract_utilities/env_utils/imports/__init__.py,sha256=LVIEQXKiAmaKKWxPxfSJKe7J
38
38
  abstract_utilities/env_utils/imports/imports.py,sha256=ZrGEf-J2lyVbb4MrNBX3DwHR0o-frba52RbPkypNvao,355
39
39
  abstract_utilities/env_utils/imports/utils.py,sha256=oB7WhIm_-cHLrUHRXypZGCdWUtNRyePaVO5_kq5Cv84,4490
40
40
  abstract_utilities/file_utils/__init__.py,sha256=I4md5xU5nuBuKyxumvKmnrR0-UgBePX9QfY-QNS-Zso,101
41
- abstract_utilities/file_utils/req.py,sha256=DicCS80V4L8GPWr7lBKDR_gTC1WI9o8lMC2IYLyDUBk,12105
41
+ abstract_utilities/file_utils/req.py,sha256=CsdGHAWIHOLqjzyoOSZ7XYbNciVYnTgaUs5qOCHttE0,11837
42
42
  abstract_utilities/file_utils/file_utils/__init__.py,sha256=fm_uNRnfKfZOIg7e1HXhWbHac5VoUgRD2iTO5cxLkA0,160
43
43
  abstract_utilities/file_utils/file_utils/file_filters.py,sha256=khfbonAPEAhW1wxfFo0I4dawYPCrIKEjNc7VKb1RvzA,3437
44
44
  abstract_utilities/file_utils/file_utils/file_reader.py,sha256=2MRj2PGKq4C-iKL8dmhHwWnhmA8GPVsNaWkTREOF9vo,24545
45
- abstract_utilities/file_utils/file_utils/file_utils.py,sha256=jCZGSE1hD_xHMHH3cJxJNb_hMRzpXH9Puyw5lbxtrks,6964
45
+ abstract_utilities/file_utils/file_utils/file_utils.py,sha256=jKMp2ch6xsxjZ8YXk2oYxTp22SU4YklCmddq3E3rmcY,7011
46
46
  abstract_utilities/file_utils/file_utils/filter_params.py,sha256=NF692W0cBhEsbtmaVzb8EKMAasasHDElSRaC9fnzYwE,3382
47
- abstract_utilities/file_utils/file_utils/imports.py,sha256=SXCMBuHUwqXbfRBk4LjKehsBKZa8-Po5UfEcNTwn4Es,24
47
+ abstract_utilities/file_utils/file_utils/imports.py,sha256=dbDJ1LptdhPJUv9g2WhJUx_3N7vFNH8lOaTPnSqmw20,293
48
48
  abstract_utilities/file_utils/file_utils/map_utils.py,sha256=B_MlkLP8s-o0yU0R3Y2LcTpBntBzysJO18qq181xz9c,1043
49
49
  abstract_utilities/file_utils/file_utils/pdf_utils.py,sha256=D_wg8h-SapCvqinxRIKxMri1jWZNpr5jGvKq9EJePfY,10335
50
50
  abstract_utilities/file_utils/imports/__init__.py,sha256=0nezbIo1RqmfZ7pZ0V3kxZDNchNWH8wVATnnvNeILMo,101
@@ -74,7 +74,7 @@ abstract_utilities/ssh_utils/classes.py,sha256=3Q9BfLpyagNFYyiF4bt-5UCezeUJv9NK9
74
74
  abstract_utilities/ssh_utils/imports.py,sha256=7-pVJK1RfR0KiZsv0mNYGPuNXA4iYqmDvqbAR9h1llU,371
75
75
  abstract_utilities/ssh_utils/pexpect_utils.py,sha256=JBdOIXBTXAqE5TrsFjmPWJgwSaWyRJN8rbJ6y3_zKPY,10556
76
76
  abstract_utilities/ssh_utils/utils.py,sha256=smUWAx3nW1h0etTndJ_te9bkUX5YzQ8kYd9_gD1TXLk,4882
77
- abstract_utilities-0.2.2.421.dist-info/METADATA,sha256=gqoBTuNFePTshXPoSCS4eCuZtmvpVNhrpMtGZsnioT4,28108
78
- abstract_utilities-0.2.2.421.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
79
- abstract_utilities-0.2.2.421.dist-info/top_level.txt,sha256=BF0GZ0xVFfN1K-hFIWPO3viNsOs1sSF86n1vHBg39FM,19
80
- abstract_utilities-0.2.2.421.dist-info/RECORD,,
77
+ abstract_utilities-0.2.2.423.dist-info/METADATA,sha256=DOOVA337bTxMSxdIFAxWfjTJEEM_743biFkJvLNwD8o,28108
78
+ abstract_utilities-0.2.2.423.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
79
+ abstract_utilities-0.2.2.423.dist-info/top_level.txt,sha256=BF0GZ0xVFfN1K-hFIWPO3viNsOs1sSF86n1vHBg39FM,19
80
+ abstract_utilities-0.2.2.423.dist-info/RECORD,,