diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-12-04 14:02:30 +0200 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-12-04 14:02:30 +0200 |
commit | 0b09facd2ea01a09340404cb82fc3cf7fd58e76c (patch) | |
tree | 95241e9bba0fe3556c7063b8fdb97a3ec429df70 | |
parent | eb7c70be9d79a4353fa9b3beb0877f7e055183d7 (diff) | |
download | pylint-0b09facd2ea01a09340404cb82fc3cf7fd58e76c.tar.gz |
Make some methods private.
-rw-r--r-- | checkers/base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/checkers/base.py b/checkers/base.py index 943f65e..17e6713 100644 --- a/checkers/base.py +++ b/checkers/base.py @@ -179,7 +179,7 @@ def _determine_function_name_type(node): return 'attr' return 'method' -def decorated_with_abc(func): +def _decorated_with_abc(func): """ Determine if the `func` node is decorated with `abc` decorators (abstractmethod et co.) """ @@ -192,12 +192,12 @@ def decorated_with_abc(func): if infered and infered.qname() in ABC_METHODS: return True -def has_abstract_methods(node): +def _has_abstract_methods(node): """ Determine if the given `node` has abstract methods, defined with `abc` module. """ - return any(decorated_with_abc(meth) + return any(_decorated_with_abc(meth) for meth in node.methods()) def report_by_type_stats(sect, stats, old_stats): @@ -398,7 +398,7 @@ class BasicErrorChecker(_BasicChecker): return # __init__ was called metaclass = infered.metaclass() - abstract_methods = has_abstract_methods(infered) + abstract_methods = _has_abstract_methods(infered) if metaclass is None: # Python 3.4 has `abc.ABC`, which won't be detected # by ClassNode.metaclass() |