xulbux 1.6.0__tar.gz → 1.6.2__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.

Potentially problematic release.


This version of xulbux might be problematic. Click here for more details.

Files changed (35) hide show
  1. {xulbux-1.6.0/src/xulbux.egg-info → xulbux-1.6.2}/PKG-INFO +3 -3
  2. {xulbux-1.6.0 → xulbux-1.6.2}/README.md +1 -1
  3. {xulbux-1.6.0 → xulbux-1.6.2}/pyproject.toml +1 -1
  4. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/__init__.py +1 -1
  5. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/_consts_.py +16 -16
  6. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_code.py +4 -4
  7. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_color.py +155 -144
  8. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_console.py +26 -41
  9. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_data.py +69 -66
  10. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_env_path.py +4 -4
  11. xulbux-1.6.2/src/xulbux/xx_file.py +65 -0
  12. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_format_codes.py +122 -64
  13. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_json.py +27 -22
  14. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_path.py +2 -7
  15. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_regex.py +61 -61
  16. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_string.py +14 -13
  17. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/xx_system.py +59 -8
  18. {xulbux-1.6.0 → xulbux-1.6.2/src/xulbux.egg-info}/PKG-INFO +3 -3
  19. {xulbux-1.6.0 → xulbux-1.6.2}/tests/test_cmd_info.py +2 -4
  20. xulbux-1.6.2/tests/test_color.py +18 -0
  21. {xulbux-1.6.0 → xulbux-1.6.2}/tests/test_color_types.py +5 -2
  22. xulbux-1.6.2/tests/test_env_vars.py +25 -0
  23. xulbux-1.6.0/src/xulbux/xx_file.py +0 -56
  24. xulbux-1.6.0/tests/test_color.py +0 -18
  25. xulbux-1.6.0/tests/test_env_vars.py +0 -25
  26. {xulbux-1.6.0 → xulbux-1.6.2}/LICENSE +0 -0
  27. {xulbux-1.6.0 → xulbux-1.6.2}/setup.cfg +0 -0
  28. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux/_cli_.py +0 -0
  29. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux.egg-info/SOURCES.txt +0 -0
  30. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux.egg-info/dependency_links.txt +0 -0
  31. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux.egg-info/entry_points.txt +0 -0
  32. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux.egg-info/requires.txt +0 -0
  33. {xulbux-1.6.0 → xulbux-1.6.2}/src/xulbux.egg-info/top_level.txt +0 -0
  34. {xulbux-1.6.0 → xulbux-1.6.2}/tests/test_data.py +0 -0
  35. {xulbux-1.6.0 → xulbux-1.6.2}/tests/test_format_codes.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: xulbux
3
- Version: 1.6.0
3
+ Version: 1.6.2
4
4
  Summary: A library which includes a lot of really helpful functions.
5
5
  Author-email: XulbuX <xulbux.real@gmail.com>
6
6
  License: MIT License
@@ -95,7 +95,7 @@ from xulbux import rgba, hsla, hexa
95
95
  | <h3>[`xx_console`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_console)</h3> | advanced actions related to the console (*pretty logging, advanced inputs, ...*) |
96
96
  | <h3>[`xx_data`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_data)</h3> | advanced operations with data structures (*compare, generate path ID's, pretty print/format, ...*) |
97
97
  | <h3>[`xx_env_path`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_env_path)</h3> | getting and editing the PATH variable (*get paths, check for paths, add paths, ...*) |
98
- | <h3>`xx_file`</h3> | advanced working with files (*create files, rename file-extensions, ...*) |
98
+ | <h3>[`xx_file`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_file)</h3> | advanced working with files (*create files, rename file-extensions, ...*) |
99
99
  | <h3>`xx_format_codes`</h3> | easy pretty printing with custom format codes (*print, inputs, custom format codes to ANSI, ...*) |
100
100
  | <h3>`xx_json`</h3> | advanced working with json files (*read, create, update, ...*) |
101
101
  | <h3>`xx_path`</h3> | advanced path operations (*get paths, smart-extend relative paths, delete paths, ...*) |
@@ -40,7 +40,7 @@ from xulbux import rgba, hsla, hexa
40
40
  | <h3>[`xx_console`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_console)</h3> | advanced actions related to the console (*pretty logging, advanced inputs, ...*) |
41
41
  | <h3>[`xx_data`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_data)</h3> | advanced operations with data structures (*compare, generate path ID's, pretty print/format, ...*) |
42
42
  | <h3>[`xx_env_path`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_env_path)</h3> | getting and editing the PATH variable (*get paths, check for paths, add paths, ...*) |
43
- | <h3>`xx_file`</h3> | advanced working with files (*create files, rename file-extensions, ...*) |
43
+ | <h3>[`xx_file`](https://github.com/XulbuX-dev/PythonLibraryXulbuX/wiki/xx_file)</h3> | advanced working with files (*create files, rename file-extensions, ...*) |
44
44
  | <h3>`xx_format_codes`</h3> | easy pretty printing with custom format codes (*print, inputs, custom format codes to ANSI, ...*) |
45
45
  | <h3>`xx_json`</h3> | advanced working with json files (*read, create, update, ...*) |
46
46
  | <h3>`xx_path`</h3> | advanced path operations (*get paths, smart-extend relative paths, delete paths, ...*) |
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "xulbux"
7
- version = "1.6.0"
7
+ version = "1.6.2"
8
8
  authors = [{ name = "XulbuX", email = "xulbux.real@gmail.com" }]
9
9
  description = "A library which includes a lot of really helpful functions."
10
10
  readme = "README.md"
@@ -19,7 +19,7 @@
19
19
  • REGEX PATTERN TEMPLATES xx.Regex
20
20
  """
21
21
 
22
- __version__ = "1.6.0"
22
+ __version__ = "1.6.2"
23
23
  __author__ = "XulbuX"
24
24
  __email__ = "xulbux.real@gmail.com"
25
25
  __license__ = "MIT"
@@ -116,14 +116,14 @@ class ANSI:
116
116
  "cyan": 36,
117
117
  "white": 37,
118
118
  ########## BRIGHT DEFAULT CONSOLE COLORS ###########
119
- ("bright:black", "br:black"): 90,
120
- ("bright:red", "br:red"): 91,
121
- ("bright:green", "br:green"): 92,
122
- ("bright:yellow", "br:yellow"): 93,
123
- ("bright:blue", "br:blue"): 94,
124
- ("bright:magenta", "br:magenta"): 95,
125
- ("bright:cyan", "br:cyan"): 96,
126
- ("bright:white", "br:white"): 97,
119
+ "br:black": 90,
120
+ "br:red": 91,
121
+ "br:green": 92,
122
+ "br:yellow": 93,
123
+ "br:blue": 94,
124
+ "br:magenta": 95,
125
+ "br:cyan": 96,
126
+ "br:white": 97,
127
127
  ######## DEFAULT CONSOLE BACKGROUND COLORS #########
128
128
  "bg:black": 40,
129
129
  "bg:red": 41,
@@ -134,12 +134,12 @@ class ANSI:
134
134
  "bg:cyan": 46,
135
135
  "bg:white": 47,
136
136
  ##### BRIGHT DEFAULT CONSOLE BACKGROUND COLORS #####
137
- ("bg:bright:black", "bg:br:black"): 100,
138
- ("bg:bright:red", "bg:br:red"): 101,
139
- ("bg:bright:green", "bg:br:green"): 102,
140
- ("bg:bright:yellow", "bg:br:yellow"): 103,
141
- ("bg:bright:blue", "bg:br:blue"): 104,
142
- ("bg:bright:magenta", "bg:br:magenta"): 105,
143
- ("bg:bright:cyan", "bg:br:cyan"): 106,
144
- ("bg:bright:white", "bg:br:white"): 107,
137
+ "bg:br:black": 100,
138
+ "bg:br:red": 101,
139
+ "bg:br:green": 102,
140
+ "bg:br:yellow": 103,
141
+ "bg:br:blue": 104,
142
+ "bg:br:magenta": 105,
143
+ "bg:br:cyan": 106,
144
+ "bg:br:white": 107,
145
145
  }
@@ -23,9 +23,9 @@ class Code:
23
23
 
24
24
  @staticmethod
25
25
  def change_tab_size(code: str, new_tab_size: int, remove_empty_lines: bool = False) -> str:
26
- """Replaces all tabs with `new_tab_size` spaces.<br>
27
- If `remove_empty_lines` is `True`, empty lines will be removed in the process.
28
- """
26
+ """Replaces all tabs with `new_tab_size` spaces.\n
27
+ ----------------------------------------------------------------------------------
28
+ If `remove_empty_lines` is `True`, empty lines will be removed in the process."""
29
29
  code_lines = String.get_lines(code, remove_empty_lines=True)
30
30
  lines = code_lines if remove_empty_lines else String.get_lines(code)
31
31
  tab_spaces = Code.get_tab_spaces(code)
@@ -54,7 +54,7 @@ class Code:
54
54
 
55
55
  @staticmethod
56
56
  def is_js(code: str, funcs: list = ["__", "$t", "$lang"]) -> bool:
57
- """Will check if the code is likely to be JavaScript."""
57
+ """Will check if the code is very likely to be JavaScript."""
58
58
  funcs = "|".join(funcs)
59
59
  js_pattern = _rx.compile(
60
60
  Regex.outside_strings(