parameters: (pieces, style)
return_statement: return {"version": rendered, "full-revisionid": pieces["long"],
              "dirty": pieces["dirty"], "error": None,
              "date": pieces.get("date")}
docstring: Render the given version pieces into the requested style.
docstring_summary: Render the given version pieces into the requested style.
docstring_tokens: Render the given version pieces into the requested style .
function: def render(pieces, style):
      """Render the given version pieces into the requested style."""
      if pieces["error"]:
          return {"version": "unknown",
                  "full-revisionid": pieces.get("long"),
                  "dirty": None,
                  "error": pieces["error"],
                  "date": None}
  
      if not style or style == "default":
          style = "pep440"  # the default
  
      if style == "pep440":
          rendered = render_pep440(pieces)
      elif style == "pep440-pre":
          rendered = render_pep440_pre(pieces)
      elif style == "pep440-post":
          rendered = render_pep440_post(pieces)
      elif style == "pep440-old":
          rendered = render_pep440_old(pieces)
      elif style == "git-describe":
          rendered = render_git_describe(pieces)
      elif style == "git-describe-long":
          rendered = render_git_describe_long(pieces)
      else:
          raise ValueError("unknown style '%s'" % style)
  
      return {"version": rendered, "full-revisionid": pieces["long"],
              "dirty": pieces["dirty"], "error": None,
              "date": pieces.get("date")}
function_tokens: def render ( pieces , style ) : if pieces [ "error" ] : return { "version" : "unknown" , "full-revisionid" : pieces . get ( "long" ) , "dirty" : None , "error" : pieces [ "error" ] , "date" : None } if not style or style == "default" : style = "pep440" # the default if style == "pep440" : rendered = render_pep440 ( pieces ) elif style == "pep440-pre" : rendered = render_pep440_pre ( pieces ) elif style == "pep440-post" : rendered = render_pep440_post ( pieces ) elif style == "pep440-old" : rendered = render_pep440_old ( pieces ) elif style == "git-describe" : rendered = render_git_describe ( pieces ) elif style == "git-describe-long" : rendered = render_git_describe_long ( pieces ) else : raise ValueError ( "unknown style '%s'" % style ) return { "version" : rendered , "full-revisionid" : pieces [ "long" ] , "dirty" : pieces [ "dirty" ] , "error" : None , "date" : pieces . get ( "date" ) }