Skip to content

Commit

Permalink
Fix pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
petere committed Feb 22, 2015
1 parent fabc9cf commit 30179da
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def main(pgversion):
if (!SAMESIGN(result, arg1))
\tereport(ERROR,
\t\t(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
\t\t errmsg("{typ} out of range")));""".format(c_type=c_types[leftarg], typ=rightarg)
\t\t errmsg("{typ} out of range")));""".format(typ=rightarg)
write_c_function(f_c, c_funcname, [leftarg], rightarg, body)
write_sql_function(f_sql, c_funcname, [leftarg], rightarg, sql_funcname=sql_funcname)
f_sql.write("CREATE CAST ({lefttype} AS {righttype}) WITH FUNCTION {func}({arg}) AS {context};\n\n"
Expand Down Expand Up @@ -635,5 +635,4 @@ def main(pgversion):


if __name__ == '__main__':
m = re.match(r'\d+\.\d+', sys.argv[1])
main(pgversion=float(m.group(0)))
main(pgversion=float(re.match(r'\d+\.\d+', sys.argv[1]).group(0)))

0 comments on commit 30179da

Please sign in to comment.