diff options
| author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-04-24 10:58:52 +0200 |
|---|---|---|
| committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-04-24 15:16:41 +0200 |
| commit | a0d43124d3b657ae4a6e678584df2ac5eee33bdc (patch) | |
| tree | 779223e2a5e2a229514435bbe2489ae92932b5f3 | |
| parent | 34d850889ed13665072b2797477e01c9f82d4cb8 (diff) | |
| download | astroid-git-a0d43124d3b657ae4a6e678584df2ac5eee33bdc.tar.gz | |
Fix function call as default argument
| -rw-r--r-- | astroid/brain/brain_nose.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/astroid/brain/brain_nose.py b/astroid/brain/brain_nose.py index 857bc84d..c28441d6 100644 --- a/astroid/brain/brain_nose.py +++ b/astroid/brain/brain_nose.py @@ -18,7 +18,10 @@ import astroid.builder _BUILDER = astroid.builder.AstroidBuilder(astroid.MANAGER) -def _pep8(name, caps=re.compile("([A-Z])")): +CAPITALS = re.compile("([A-Z])") + + +def _pep8(name, caps=CAPITALS): return caps.sub(lambda m: "_" + m.groups()[0].lower(), name) |
