Skip to content

Commit

Permalink
Rename global "constant" to follow PEP-8 naming
Browse files Browse the repository at this point in the history
  • Loading branch information
codebrainz authored and kugel- committed Feb 16, 2016
1 parent 402e771 commit 4f3e32e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/gen-api-gtkdoc.py
Expand Up @@ -16,9 +16,9 @@ def normalize_text(s):
# doxygen records some definitions in C++ style, fix those
# "bool FooBar::flag" => "bool flag"
# void(* _GeanyObjectClass::project_open) (GKeyFile *keyfile) => void(* project_open) (GKeyFile *keyfile)
prog = re.compile(r'[_a-zA-Z][_0-9a-zA-Z]*::')
CXX_NAMESPACE_RE = re.compile(r'[_a-zA-Z][_0-9a-zA-Z]*::')
def fix_definition(s):
return prog.sub(r"", s);
return CXX_NAMESPACE_RE.sub(r"", s);

assert(fix_definition("bool flag") == "bool flag")
assert(fix_definition("bool FooBar::flag") == "bool flag")
Expand Down

0 comments on commit 4f3e32e

Please sign in to comment.