summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadosław Ganczarek <radoslaw@ganczarek.in>2015-07-25 14:16:57 +0200
committerRadosław Ganczarek <radoslaw@ganczarek.in>2015-07-25 14:16:57 +0200
commit6099799cb3747e222dc89695b64716f55b0ea981 (patch)
tree4e2e801ec0ecfc74a682260746a121e9e12058ee
parent645b0ce18fdb082112da1e6e6c78bf681f2c5af6 (diff)
downloadastroid-git-6099799cb3747e222dc89695b64716f55b0ea981.tar.gz
Proper argument name
-rw-r--r--astroid/modutils.py8
-rw-r--r--astroid/tests/unittest_modutils.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/astroid/modutils.py b/astroid/modutils.py
index 605f5eb4..df0224bb 100644
--- a/astroid/modutils.py
+++ b/astroid/modutils.py
@@ -394,7 +394,7 @@ def get_module_part(dotted_name, context_file=None):
return dotted_name
-def get_module_files(src_directory, blacklist, get_all=False):
+def get_module_files(src_directory, blacklist, list_all=False):
"""given a package directory return a list of all available python
module's files in the package and its subpackages
@@ -407,8 +407,8 @@ def get_module_files(src_directory, blacklist, get_all=False):
optional list of files or directory to ignore, default to the value of
`logilab.common.STD_BLACKLIST`
- :type get_all: bool
- :para get_all:
+ :type list_all: bool
+ :para list_all:
boolean value of if we want to get all python files,
ignoring the missing __init__.py
@@ -421,7 +421,7 @@ def get_module_files(src_directory, blacklist, get_all=False):
for directory, dirnames, filenames in scandir.walk(src_directory):
_handle_blacklist(blacklist, dirnames, filenames)
# check for __init__.py
- if not get_all and not '__init__.py' in filenames:
+ if not list_all and not '__init__.py' in filenames:
dirnames[:] = ()
continue
for filename in filenames:
diff --git a/astroid/tests/unittest_modutils.py b/astroid/tests/unittest_modutils.py
index 23dff69b..9f5c88c3 100644
--- a/astroid/tests/unittest_modutils.py
+++ b/astroid/tests/unittest_modutils.py
@@ -252,14 +252,14 @@ class GetModuleFilesTest(unittest.TestCase):
{os.path.join(package, x) for x in ['__init__.py', 'module.py', 'module2.py', 'noendingnewline.py', 'nonregr.py']})
def test_get_all_files(self):
- """with the flag get_all set to True return files, that live
+ """with the flag list_all set to True return files, that live
in non-module directories
"""
non_package = resources.find('data/notamodule')
- modules = set(modutils.get_module_files(non_package, [], True))
+ modules = modutils.get_module_files(non_package, [], list_all=True)
self.assertEqual(
modules,
- {os.path.join(non_package, 'file.py')},
+ [os.path.join(non_package, 'file.py')],
)
def test_load_module_set_attribute(self):