parameters: (root, **kwargs)
return_statement: return "{}.{}.{}.dev{}".format(major, minor, patch, version.distance or 0)
docstring: Parse function for setuptools_scm that ignores tags for non-C++
      subprojects, e.g. apache-arrow-js-XXX tags.
docstring_summary: Parse function for setuptools_scm that ignores tags for non-C++
      subprojects, e.g. apache-arrow-js-XXX tags.
docstring_tokens: Parse function for setuptools_scm that ignores tags for non - C ++ subprojects e . g . apache - arrow - js - XXX tags .
function: def get_version(root, **kwargs):
      """
      Parse function for setuptools_scm that ignores tags for non-C++
      subprojects, e.g. apache-arrow-js-XXX tags.
      """
      from setuptools_scm.git import parse as parse_git_version
  
      # query the calculated version based on the git tags
      kwargs['describe_command'] = (
          'git describe --dirty --tags --long --match "apache-arrow-[0-9].*"'
      )
      version = parse_git_version(root, **kwargs)
      tag = str(version.tag)
  
      # We may get a development tag for the next version, such as "5.0.0.dev0",
      # or the tag of an already released version, such as "4.0.0".
      # In the latter case, we need to increment the version so that the computed
      # version comes after any patch release (the next feature version after
      # 4.0.0 is 5.0.0).
      pattern = r"^(\d+)\.(\d+)\.(\d+)"
      match = re.match(pattern, tag)
      major, minor, patch = map(int, match.groups())
      if 'dev' not in tag:
          major += 1
  
      return "{}.{}.{}.dev{}".format(major, minor, patch, version.distance or 0)
function_tokens: def get_version ( root , * * kwargs ) : from setuptools_scm . git import parse as parse_git_version # query the calculated version based on the git tags kwargs [ 'describe_command' ] = ( 'git describe --dirty --tags --long --match "apache-arrow-[0-9].*"' ) version = parse_git_version ( root , * * kwargs ) tag = str ( version . tag ) # We may get a development tag for the next version, such as "5.0.0.dev0", # or the tag of an already released version, such as "4.0.0". # In the latter case, we need to increment the version so that the computed # version comes after any patch release (the next feature version after # 4.0.0 is 5.0.0). pattern = r"^(\d+)\.(\d+)\.(\d+)" match = re . match ( pattern , tag ) major , minor , patch = map ( int , match . groups ( ) ) if 'dev' not in tag : major += 1 return "{}.{}.{}.dev{}" . format ( major , minor , patch , version . distance or 0 )