bluer-objects 6.242.1__py3-none-any.whl → 6.244.1__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 bluer-objects might be problematic. Click here for more details.

@@ -158,20 +158,29 @@ def build(
158
158
  continue
159
159
 
160
160
  if template_line.startswith("title:::"):
161
- content += process_title(
161
+ success, updated_content = process_title(
162
162
  template_line,
163
163
  filename,
164
164
  )
165
+ if not success:
166
+ return success
167
+
168
+ content += updated_content
165
169
  continue
166
170
 
167
171
  if "help:::" in template_line:
168
172
  if help_function is None:
169
- logger.warning("help_function not found.")
170
- else:
171
- content += process_help(
172
- template_line,
173
- help_function,
174
- )
173
+ logger.error("help_function not found.")
174
+ return False
175
+
176
+ success, updated_content = process_help(
177
+ template_line,
178
+ help_function,
179
+ )
180
+ if not success:
181
+ return success
182
+
183
+ content += updated_content
175
184
  continue
176
185
 
177
186
  content_section = [template_line]
@@ -1,5 +1,5 @@
1
1
  import os
2
- from typing import List, Dict, Union, Callable
2
+ from typing import List, Dict, Union, Callable, Tuple
3
3
 
4
4
  from bluer_options.env import get_env
5
5
  from bluer_objects import file
@@ -105,15 +105,15 @@ def process_envs(template_line: str) -> str:
105
105
  def process_help(
106
106
  template_line: str,
107
107
  help_function: Union[Callable[[List[str]], str], None] = None,
108
- ) -> List[str]:
108
+ ) -> Tuple[bool, List[str]]:
109
109
  help_command = template_line.split("help:::")[1].strip()
110
110
 
111
111
  tokens = help_command.strip().split(" ")[1:]
112
112
 
113
113
  help_content = help_function(tokens)
114
114
  if not help_content:
115
- logger.warning(f"help not found: {help_command}: {tokens}")
116
- return []
115
+ logger.error(f"help not found: {help_command}: {tokens}")
116
+ return False, []
117
117
 
118
118
  logger.info(f"+= help: {help_command}")
119
119
  print(help_content)
@@ -123,7 +123,7 @@ def process_help(
123
123
  "```",
124
124
  ]
125
125
 
126
- return content_section
126
+ return True, content_section
127
127
 
128
128
 
129
129
  def process_include(
@@ -202,7 +202,7 @@ def process_objects(template_line: str) -> str:
202
202
  def process_title(
203
203
  template_line: str,
204
204
  filename: str,
205
- ) -> List[str]:
205
+ ) -> Tuple[bool, List[str]]:
206
206
  template_line_pieces = [
207
207
  piece for piece in template_line.strip().split(":::") if piece
208
208
  ]
@@ -210,20 +210,20 @@ def process_title(
210
210
 
211
211
  filename_path_pieces = file.path(filename).split(os.sep)
212
212
  if reference not in filename_path_pieces:
213
- logger.warning(
213
+ logger.error(
214
214
  "reference: {} not found in {}.".format(
215
215
  reference,
216
216
  template_line,
217
217
  )
218
218
  )
219
- return ["# title: not found"]
219
+ return False, []
220
220
 
221
221
  title_pieces = filename_path_pieces[filename_path_pieces.index(reference) + 1 :]
222
222
  filename_name = file.name(filename)
223
223
  if filename_name != "README":
224
224
  title_pieces.append(filename_name)
225
225
 
226
- return ["# {}".format(": ".join(title_pieces))]
226
+ return True, ["# {}".format(": ".join(title_pieces))]
227
227
 
228
228
 
229
229
  def process_variable(template_line: str):
bluer_objects/__init__.py CHANGED
@@ -4,7 +4,7 @@ ICON = "🌀"
4
4
 
5
5
  DESCRIPTION = f"{ICON} Object management in Bash."
6
6
 
7
- VERSION = "6.242.1"
7
+ VERSION = "6.244.1"
8
8
 
9
9
  REPO_NAME = "bluer-objects"
10
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bluer_objects
3
- Version: 6.242.1
3
+ Version: 6.244.1
4
4
  Summary: 🌀 Object management in Bash.
5
5
  Home-page: https://github.com/kamangir/bluer-objects
6
6
  Author: Arash Abadpour (Kamangir)
@@ -64,6 +64,6 @@ pip install bluer-objects
64
64
 
65
65
  [![pylint](https://github.com/kamangir/bluer-objects/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/bluer-objects/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/bluer-objects/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/bluer-objects/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/bluer-objects/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/bluer-objects/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/bluer-objects.svg)](https://pypi.org/project/bluer-objects/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/bluer-objects)](https://pypistats.org/packages/bluer-objects)
66
66
 
67
- built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.242.1`](https://github.com/kamangir/bluer-objects).
67
+ built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.244.1`](https://github.com/kamangir/bluer-objects).
68
68
 
69
69
  built by 🌀 [`blueness-3.118.1`](https://github.com/kamangir/blueness).
@@ -1,4 +1,4 @@
1
- bluer_objects/__init__.py,sha256=nY31WwmtMAV3N7XWfwsK-w1RMQKdmhq4g9yfo-7czhE,315
1
+ bluer_objects/__init__.py,sha256=DBQpvasVjbVrMx86VEELGr0i_HO-PKwf2I7nNjEEOfc,315
2
2
  bluer_objects/__main__.py,sha256=Yqfov833_hJuRne19WrGhT5DWAPtdffpoMxeSXS7EGw,359
3
3
  bluer_objects/config.env,sha256=RjcpnbKfRqNyGLRB4z7M_OG9z2pOM032ck__53JqXqo,216
4
4
  bluer_objects/env.py,sha256=iw4QvaImqnavlsHwfkUScNHc7afDEJQKJSsHTtVJE78,2019
@@ -72,9 +72,9 @@ bluer_objects/.abcli/tests/web_where_am_ai.sh,sha256=BJ9G_m4id8cx_UB_l_jV2xY6AfQ
72
72
  bluer_objects/.abcli/web/is_accessible.sh,sha256=Luv_6IvpscRYx7f39V0RnkkNEWTRfVGyQVUeij3iqa0,262
73
73
  bluer_objects/.abcli/web/where_am_i.sh,sha256=QPBXFo6Ni4pZEoOx0rtuJUxk6tOlp0ESMyAc9YPy9zg,92
74
74
  bluer_objects/README/__init__.py,sha256=JwxdTVAK3LeUaw7rMJujOFIXZA59HaLCtxpsR1C-vpo,1311
75
- bluer_objects/README/functions.py,sha256=4GUp3gRlfvAyOiaVxbdy7RF8i-Jwz2LjTEYe7jf-lxI,5589
75
+ bluer_objects/README/functions.py,sha256=myga8anMnsIZuFP5vTaVuz8p1rvDD_n7GR966q8E_j8,5813
76
76
  bluer_objects/README/items.py,sha256=Q84s0qUgybI59BV3-Z-Fbkgal1iBESaC6J9jq_FfevQ,1262
77
- bluer_objects/README/utils.py,sha256=hEEhULbnYnJ-hl97JK7SfNyOjAec8XXiM_zWnq0mSh8,7972
77
+ bluer_objects/README/utils.py,sha256=moNeJHHxXF_bh0SNb0FbRZnK5MXqO3ZNqwRw0DCRxN4,8007
78
78
  bluer_objects/file/__init__.py,sha256=c_79ipBkKl6OFDimOev0vnaVdpUk-Bl3oJUapOreMXc,681
79
79
  bluer_objects/file/__main__.py,sha256=v2IXWvZeh_B2sGYWzv1CiUY-7HWHXXghZM5M4IPjbu4,1277
80
80
  bluer_objects/file/classes.py,sha256=TRgeRP2yxInPkBnywhuB4BsoBcBRA3UmQzX1dI43UxU,872
@@ -171,8 +171,8 @@ bluer_objects/tests/test_web_is_accessible.py,sha256=2Y20NAEDMblg0MKnhnqcfw3XVKE
171
171
  bluer_objects/web/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
172
172
  bluer_objects/web/__main__.py,sha256=xf2Ob54FI8JEokfGhFmiyOBdD9nBactwqmZvsKsdioU,624
173
173
  bluer_objects/web/functions.py,sha256=KNufAFOc6N3BYf83lN2rUpKUdsnzb2anWyp9koFRVUo,172
174
- bluer_objects-6.242.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
175
- bluer_objects-6.242.1.dist-info/METADATA,sha256=9LjxxWPR5G2VCj8spt24aUfdJuwc1iHLh1TQGu9YAdc,3678
176
- bluer_objects-6.242.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
177
- bluer_objects-6.242.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
178
- bluer_objects-6.242.1.dist-info/RECORD,,
174
+ bluer_objects-6.244.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
175
+ bluer_objects-6.244.1.dist-info/METADATA,sha256=lfyXEoD4n0yjWH8nbS9zQDvYKXGLr9wOkKrIL077Dac,3678
176
+ bluer_objects-6.244.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
177
+ bluer_objects-6.244.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
178
+ bluer_objects-6.244.1.dist-info/RECORD,,