bare-script 3.0.12__tar.gz → 3.0.14__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.
- {bare_script-3.0.12/src/bare_script.egg-info → bare_script-3.0.14}/PKG-INFO +2 -2
- {bare_script-3.0.12 → bare_script-3.0.14}/setup.cfg +2 -2
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/library.py +6 -12
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/value.py +7 -3
- {bare_script-3.0.12 → bare_script-3.0.14/src/bare_script.egg-info}/PKG-INFO +2 -2
- {bare_script-3.0.12 → bare_script-3.0.14}/LICENSE +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/README.md +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/pyproject.toml +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/__init__.py +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/__main__.py +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/bare.py +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/baredoc.py +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/data.py +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/model.py +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/options.py +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/parser.py +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script/runtime.py +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script.egg-info/SOURCES.txt +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script.egg-info/dependency_links.txt +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script.egg-info/entry_points.txt +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script.egg-info/requires.txt +0 -0
- {bare_script-3.0.12 → bare_script-3.0.14}/src/bare_script.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bare-script
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.14
|
|
4
4
|
Summary: bare-script
|
|
5
5
|
Home-page: https://github.com/craigahobbs/bare-script
|
|
6
6
|
Author: Craig A. Hobbs
|
|
@@ -11,11 +11,11 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Topic :: Software Development :: Interpreters
|
|
20
20
|
Classifier: Topic :: Utilities
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = bare-script
|
|
3
|
-
version = 3.0.
|
|
3
|
+
version = 3.0.14
|
|
4
4
|
url = https://github.com/craigahobbs/bare-script
|
|
5
5
|
author = Craig A. Hobbs
|
|
6
6
|
author_email = craigahobbs@gmail.com
|
|
@@ -14,11 +14,11 @@ classifiers =
|
|
|
14
14
|
Intended Audience :: Developers
|
|
15
15
|
License :: OSI Approved :: MIT License
|
|
16
16
|
Operating System :: OS Independent
|
|
17
|
-
Programming Language :: Python :: 3.8
|
|
18
17
|
Programming Language :: Python :: 3.9
|
|
19
18
|
Programming Language :: Python :: 3.10
|
|
20
19
|
Programming Language :: Python :: 3.11
|
|
21
20
|
Programming Language :: Python :: 3.12
|
|
21
|
+
Programming Language :: Python :: 3.13
|
|
22
22
|
Topic :: Software Development :: Interpreters
|
|
23
23
|
Topic :: Utilities
|
|
24
24
|
|
|
@@ -1961,16 +1961,13 @@ _SYSTEM_TYPE_ARGS = value_args_model([
|
|
|
1961
1961
|
# $group: URL
|
|
1962
1962
|
# $doc: Encode a URL
|
|
1963
1963
|
# $arg url: The URL string
|
|
1964
|
-
# $arg extra: Optional (default is true). If true, encode extra characters for wider compatibility.
|
|
1965
1964
|
# $return: The encoded URL string
|
|
1966
1965
|
def _url_encode(args, unused_options):
|
|
1967
|
-
url,
|
|
1968
|
-
safe
|
|
1969
|
-
return urllib.parse.quote(url, safe=safe)
|
|
1966
|
+
url, = value_args_validate(_URL_ENCODE_ARGS, args)
|
|
1967
|
+
return urllib.parse.quote(url, safe="':/&+")
|
|
1970
1968
|
|
|
1971
1969
|
_URL_ENCODE_ARGS = value_args_model([
|
|
1972
|
-
{'name': 'url', 'type': 'string'}
|
|
1973
|
-
{'name': 'extra', 'type': 'boolean', 'default': True}
|
|
1970
|
+
{'name': 'url', 'type': 'string'}
|
|
1974
1971
|
])
|
|
1975
1972
|
|
|
1976
1973
|
|
|
@@ -1978,16 +1975,13 @@ _URL_ENCODE_ARGS = value_args_model([
|
|
|
1978
1975
|
# $group: URL
|
|
1979
1976
|
# $doc: Encode a URL component
|
|
1980
1977
|
# $arg url: The URL component string
|
|
1981
|
-
# $arg extra: Optional (default is true). If true, encode extra characters for wider compatibility.
|
|
1982
1978
|
# $return: The encoded URL component string
|
|
1983
1979
|
def _url_encode_component(args, unused_options):
|
|
1984
|
-
url,
|
|
1985
|
-
safe
|
|
1986
|
-
return urllib.parse.quote(url, safe=safe)
|
|
1980
|
+
url, = value_args_validate(_URL_ENCODE_COMPONENT_ARGS, args)
|
|
1981
|
+
return urllib.parse.quote(url, safe="'")
|
|
1987
1982
|
|
|
1988
1983
|
_URL_ENCODE_COMPONENT_ARGS = value_args_model([
|
|
1989
|
-
{'name': 'url', 'type': 'string'}
|
|
1990
|
-
{'name': 'extra', 'type': 'boolean', 'default': True}
|
|
1984
|
+
{'name': 'url', 'type': 'string'}
|
|
1991
1985
|
])
|
|
1992
1986
|
|
|
1993
1987
|
|
|
@@ -308,7 +308,7 @@ def value_args_validate(fn_args, args, error_return_value=None):
|
|
|
308
308
|
|
|
309
309
|
# Extra arguments?
|
|
310
310
|
if len(args) > len(fn_args):
|
|
311
|
-
|
|
311
|
+
raise ValueArgsError(None, len(args), error_return_value)
|
|
312
312
|
|
|
313
313
|
return args
|
|
314
314
|
|
|
@@ -321,14 +321,18 @@ class ValueArgsError(Exception):
|
|
|
321
321
|
|
|
322
322
|
The function's error return value
|
|
323
323
|
|
|
324
|
-
:param arg_name: The function argument name
|
|
324
|
+
:param arg_name: The function argument name. If `arg_name` is None, there are too many arguments,
|
|
325
|
+
and `arg_value` is the number of arguments.
|
|
325
326
|
:type arg_name: str
|
|
326
327
|
:param arg_value: The function argument value
|
|
327
328
|
:param return_value: The function's error return value
|
|
328
329
|
"""
|
|
329
330
|
|
|
330
331
|
def __init__(self, arg_name, arg_value, return_value = None):
|
|
331
|
-
|
|
332
|
+
if arg_name is None:
|
|
333
|
+
message = f'Too many arguments ({value_json(arg_value)})'
|
|
334
|
+
else:
|
|
335
|
+
message = f'Invalid "{arg_name}" argument value, {value_json(arg_value)}'
|
|
332
336
|
super().__init__(message)
|
|
333
337
|
self.return_value = return_value
|
|
334
338
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bare-script
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.14
|
|
4
4
|
Summary: bare-script
|
|
5
5
|
Home-page: https://github.com/craigahobbs/bare-script
|
|
6
6
|
Author: Craig A. Hobbs
|
|
@@ -11,11 +11,11 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Topic :: Software Development :: Interpreters
|
|
20
20
|
Classifier: Topic :: Utilities
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
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
|