abstract-utilities 0.2.2.504__py3-none-any.whl → 0.2.2.507__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.
@@ -79,7 +79,7 @@ def _normalize_listlike(value, typ=list, sep=','):
79
79
  value = [v.strip() for v in value.split(sep) if v.strip()]
80
80
  return typ(value)
81
81
 
82
- def _ensure_exts(exts):
82
+ def ensure_exts(exts):
83
83
  if exts in [True, None, False]:
84
84
  return exts
85
85
  out = []
@@ -89,7 +89,7 @@ def _ensure_exts(exts):
89
89
  out.append(ext)
90
90
  return set(out)
91
91
 
92
- def _ensure_patterns(patterns):
92
+ def ensure_patterns(patterns):
93
93
  """Normalize pattern list and ensure they are valid globs."""
94
94
  if patterns in [True, None, False]:
95
95
  return patterns
@@ -130,14 +130,14 @@ def derive_file_defaults(
130
130
  allowed_patterns=False, exclude_patterns=False,
131
131
  add=False
132
132
  ):
133
- allowed_exts = _get_default_modular(_ensure_exts(allowed_exts), DEFAULT_ALLOWED_EXTS, add, set)
134
- unallowed_exts = _get_default_modular(_ensure_exts(unallowed_exts), DEFAULT_UNALLOWED_EXTS, add, set)
133
+ allowed_exts = _get_default_modular(ensure_exts(allowed_exts), DEFAULT_ALLOWED_EXTS, add, set)
134
+ unallowed_exts = _get_default_modular(ensure_exts(unallowed_exts), DEFAULT_UNALLOWED_EXTS, add, set)
135
135
  allowed_types = _get_default_modular(_normalize_listlike(allowed_types, set), DEFAULT_ALLOWED_TYPES, add, set)
136
136
  exclude_types = _get_default_modular(_normalize_listlike(exclude_types, set), DEFAULT_EXCLUDE_TYPES, add, set)
137
137
  allowed_dirs = _get_default_modular(_normalize_listlike(allowed_dirs, list), DEFAULT_ALLOWED_DIRS, add, list)
138
138
  exclude_dirs = _get_default_modular(_normalize_listlike(exclude_dirs, list), DEFAULT_EXCLUDE_DIRS, add, list)
139
- allowed_patterns = _get_default_modular(_ensure_patterns(allowed_patterns), DEFAULT_ALLOWED_PATTERNS, add, list)
140
- exclude_patterns = _get_default_modular(_ensure_patterns(exclude_patterns), DEFAULT_EXCLUDE_PATTERNS, add, list)
139
+ allowed_patterns = _get_default_modular(ensure_patterns(allowed_patterns), DEFAULT_ALLOWED_PATTERNS, add, list)
140
+ exclude_patterns = _get_default_modular(ensure_patterns(exclude_patterns), DEFAULT_EXCLUDE_PATTERNS, add, list)
141
141
 
142
142
  return {
143
143
  "allowed_exts": allowed_exts,
@@ -19,19 +19,21 @@ def get_logFile(bpName: str = None, maxBytes: int = 100_000, backupCount: int =
19
19
  logger.setLevel(logging.INFO)
20
20
 
21
21
  if not logger.handlers:
22
- handler = RotatingFileHandler(log_path, maxBytes=maxBytes, backupCount=backupCount)
23
- handler.setLevel(logging.INFO)
24
-
25
- fmt = "%(asctime)s - %(levelname)s - %(pathname)s - %(message)s"
26
- formatter = logging.Formatter(fmt)
27
- handler.setFormatter(formatter)
28
- logger.addHandler(handler)
29
-
30
- console = logging.StreamHandler()
31
- console.setLevel(logging.INFO)
32
- console.setFormatter(formatter)
33
- logger.addHandler(console)
34
-
22
+ try:
23
+ handler = RotatingFileHandler(log_path, maxBytes=maxBytes, backupCount=backupCount)
24
+ handler.setLevel(logging.INFO)
25
+
26
+ fmt = "%(asctime)s - %(levelname)s - %(pathname)s - %(message)s"
27
+ formatter = logging.Formatter(fmt)
28
+ handler.setFormatter(formatter)
29
+ logger.addHandler(handler)
30
+
31
+ console = logging.StreamHandler()
32
+ console.setLevel(logging.INFO)
33
+ console.setFormatter(formatter)
34
+ logger.addHandler(console)
35
+ except Exception as e:
36
+ print(f"{e}")
35
37
  return logger
36
38
 
37
39
  def _find_caller_frame_index():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstract_utilities
3
- Version: 0.2.2.504
3
+ Version: 0.2.2.507
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
@@ -84,7 +84,7 @@ abstract_utilities/file_utils/src/__init__.py,sha256=6D5ZqbBLq7aOAD0TT0JLeGKmWST
84
84
  abstract_utilities/file_utils/src/file_filters.py,sha256=YNRWkFfHJvswoRMkLPm2cCd6fhk1a238f9Bk_fh_TNU,3582
85
85
  abstract_utilities/file_utils/src/file_reader.py,sha256=hSC5eC4uvuy_nsPOKbfOsvG6UdBKCfvJwQdhOT4_y2I,24546
86
86
  abstract_utilities/file_utils/src/file_utils.py,sha256=Kg1pn31_Yngyuac_Vku-Jwa5JNcsd7SNCrV8O7H88yo,10219
87
- abstract_utilities/file_utils/src/filter_params.py,sha256=dlZkJpL1eu_xSFOV5pjleBHzVOas9HXzn4Jyca6dxOc,5354
87
+ abstract_utilities/file_utils/src/filter_params.py,sha256=-qoKjSxzXpaI2og5PiDZpLh7FLFTgeJ1Vxjz26RU-Pk,5348
88
88
  abstract_utilities/file_utils/src/find_collect.py,sha256=MbTXqQhBHePNC8Zr2b1dEO1T9KqE_piEMnXbpblhJbU,4704
89
89
  abstract_utilities/file_utils/src/initFunctionsGen.py,sha256=qhMm0k1WQckDTxQdtQuCyPAbd817p_qEj8Gp0C-Lz_0,9986
90
90
  abstract_utilities/file_utils/src/map_utils.py,sha256=7GYntXbMz3vYrXWE-TxLuZRcQudlDA6vAWGErzVv1mk,1044
@@ -138,7 +138,7 @@ abstract_utilities/list_utils/imports/module_imports.py,sha256=47DEQpj8HBSa-_TIm
138
138
  abstract_utilities/log_utils/__init__.py,sha256=QzmY8RLyegJsq9Id06dHMiJAit5jxUzwhkY5-qgqxBU,141
139
139
  abstract_utilities/log_utils/abstractLogManager.py,sha256=EF4GkNbeCUh_RStN2Sf_PmxgyUmxeB5RJT7P-SHGZ3w,2823
140
140
  abstract_utilities/log_utils/call_response.py,sha256=E_QdT6R5REuXxeUuEXLwjUh8D0Lk0vair2ryRj4zocY,2518
141
- abstract_utilities/log_utils/log_file.py,sha256=qoVz1uQaAk3Pscxmtv9NevsNnsCBZR9j9HaVWeSPHg8,2237
141
+ abstract_utilities/log_utils/log_file.py,sha256=L2kZnTcG7RDQHiD4tW9gd9-FKdaLuIwfHBFzB9-5Wv8,2346
142
142
  abstract_utilities/log_utils/logger_callable.py,sha256=9STZtZrmUlXmakxhwmXNPpCSQC10aCTMNjXbhaWZ7_8,1629
143
143
  abstract_utilities/log_utils/imports/__init__.py,sha256=sUUAr6PY1SMtVjSTsb08dFU6mF-Ug4usnbh908q4Jq0,53
144
144
  abstract_utilities/log_utils/imports/imports.py,sha256=TGhATFGyhvovFFKYH-CbCnEQK0WCkmA1C5LqvmmzlrQ,189
@@ -223,7 +223,7 @@ abstract_utilities/type_utils/imports/__init__.py,sha256=sUUAr6PY1SMtVjSTsb08dFU
223
223
  abstract_utilities/type_utils/imports/imports.py,sha256=C_ZAQO-y7R31BYxTuaHJCEQE9IZSU1JgCtdHNWxZKhY,77
224
224
  abstract_utilities/type_utils/imports/module_imports.py,sha256=sxF9YJQhUFUivgslnU-4Y5GG_J1IHR7kunUefIYZ0Lk,36
225
225
  imports/__init__.py,sha256=2PSEAwZY88J2NHt98XCO5drFNok5ctiJ8LE02kwABP4,944
226
- abstract_utilities-0.2.2.504.dist-info/METADATA,sha256=kNgSY3D6UBPRbwXdTYJYJn6lTqjcaCLSiBw7JTA4NDU,28108
227
- abstract_utilities-0.2.2.504.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
228
- abstract_utilities-0.2.2.504.dist-info/top_level.txt,sha256=5pbhdfsOfdi_30kABhMFqL2SCMdG6g1ohS6rb1VNS5I,27
229
- abstract_utilities-0.2.2.504.dist-info/RECORD,,
226
+ abstract_utilities-0.2.2.507.dist-info/METADATA,sha256=_llihvHu3C_ky3ykAuqZYg2EPf1Gi5C9tPg2QV_H6PQ,28108
227
+ abstract_utilities-0.2.2.507.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
228
+ abstract_utilities-0.2.2.507.dist-info/top_level.txt,sha256=5pbhdfsOfdi_30kABhMFqL2SCMdG6g1ohS6rb1VNS5I,27
229
+ abstract_utilities-0.2.2.507.dist-info/RECORD,,