cmdkit 2.7.4__tar.gz → 2.7.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cmdkit
3
- Version: 2.7.4
3
+ Version: 2.7.5
4
4
  Summary: A command-line utility toolkit for Python.
5
5
  Home-page: https://cmdkit.readthedocs.io
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cmdkit"
3
- version = "2.7.4"
3
+ version = "2.7.5"
4
4
  description = "A command-line utility toolkit for Python."
5
5
  readme = "README.rst"
6
6
  license = "Apache-2.0"
@@ -140,7 +140,7 @@ def _format_options(text: str) -> str:
140
140
 
141
141
  def _format_special_metavars(text: str) -> str:
142
142
  """Add rich ANSI formatting to special argument syntax."""
143
- metavars_pattern = r'\b(?<!-)(?P<arg>[A-Z]{3,})\b'
143
+ metavars_pattern = r'(?<!-)\b(?P<arg>[A-Z]{2,})\b'
144
144
  return re.sub(metavars_pattern + NOT_QUOTED, italic(r'\g<arg>'), text)
145
145
 
146
146
 
@@ -152,7 +152,7 @@ def _format_special_device(text: str) -> str:
152
152
  def _format_special_reserved_names(text: str) -> str:
153
153
  """Special reserved names (e.g., localhost)."""
154
154
  names = ['localhost', 'stdin', 'stdout', 'stderr', ]
155
- names_pattern = r'\b(?P<name>' + '|'.join(names) + r')\b'
155
+ names_pattern = r'(?<!-)\b(?P<name>' + '|'.join(names) + r')\b'
156
156
  return re.sub(names_pattern + NOT_QUOTED, italic(r'\g<name>'), text)
157
157
 
158
158
 
@@ -175,4 +175,3 @@ def _format_digit(text: str) -> str:
175
175
  """Add rich ANSI formatting to numerical digits."""
176
176
  return re.sub(r'\b(?P<num>\d+\.?[kmgtKMGT]?[bB]?|null|NULL)\b' + NOT_QUOTED,
177
177
  green(r'\g<num>'), text)
178
-
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