improve formating
fix kwargs call
This commit is contained in:
@@ -520,7 +520,7 @@ class gitversionhelper: # pylint: disable=too-few-public-methods
|
||||
the last version
|
||||
"""
|
||||
if gitversionhelper.repository.isDirty() is not False:
|
||||
raise gitversionhelper.repository.repositoryDirty("The repository is dirty and a current version" " can not be generated.")
|
||||
raise gitversionhelper.repository.repositoryDirty("The repository is dirty and a current version can not be generated.")
|
||||
saved_kwargs = copy(kwargs)
|
||||
if "formated_output" in kwargs:
|
||||
del saved_kwargs["formated_output"]
|
||||
@@ -541,7 +541,7 @@ class gitversionhelper: # pylint: disable=too-few-public-methods
|
||||
Same as getCurrentVersion() with formated_output kwarg activated
|
||||
"""
|
||||
kwargs["formated_output"] = True
|
||||
return cls.getCurrentVersion(kwargs)
|
||||
return cls.getCurrentVersion(**kwargs)
|
||||
|
||||
@classmethod
|
||||
def _parseTag(cls, tag, **kwargs): # pylint: disable=R0914, R0912, R0915
|
||||
@@ -614,7 +614,7 @@ class gitversionhelper: # pylint: disable=too-few-public-methods
|
||||
raise gitversionhelper.version.noValidVersion("no valid version found in tags")
|
||||
|
||||
if pre_count > 0 and post_count > 0:
|
||||
raise cls.PreAndPostVersionUnsupported("can not parse a version with both pre" " and post release number.")
|
||||
raise cls.PreAndPostVersionUnsupported("can not parse a version with both pre and post release number.")
|
||||
return cls.MetaVersion(VersionStd, major, minor, patch, pre_count, post_count, tag)
|
||||
|
||||
@classmethod
|
||||
@@ -686,7 +686,7 @@ class gitversionhelper: # pylint: disable=too-few-public-methods
|
||||
OutputFormat = "{major}.{minor}.{patch}{revpattern}{revcount}"
|
||||
if post_count > 0 and pre_count > 0:
|
||||
raise gitversionhelper.version.PreAndPostVersionUnsupported(
|
||||
"cannot output a version with both pre " "and post release number."
|
||||
"cannot output a version with both pre and post release number."
|
||||
)
|
||||
if VersionStd == "PEP440":
|
||||
if post_count > 0:
|
||||
|
||||
Reference in New Issue
Block a user