We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa84748 commit fd82193Copy full SHA for fd82193
src/setuptools_scm/_get_version_impl.py
@@ -18,6 +18,10 @@
18
from .version import format_version as _format_version
19
from .version import ScmVersion
20
21
+EMPTY_TAG_REGEX_DEPRECATION = DeprecationWarning(
22
+ "empty regex for tag regex is invalid, using default"
23
+)
24
+
25
_log = logging.getLogger(__name__)
26
27
@@ -162,11 +166,7 @@ def get_version(
162
166
def parse_tag_regex(tag_regex: str | Pattern[str]) -> Pattern[str]:
163
167
if isinstance(tag_regex, str):
164
168
if tag_regex == "":
165
- warnings.warn(
- DeprecationWarning(
- "empty regex for tag regex is invalid, using default"
- )
169
+ warnings.warn(EMPTY_TAG_REGEX_DEPRECATION)
170
return _config.DEFAULT_TAG_REGEX
171
else:
172
return re.compile(tag_regex)
0 commit comments