Commit 7d3d73d4 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by hydrargyrum
Browse files

weboob_lint: Show modules that are Python 2 only

parent fb5461f9
......@@ -20,6 +20,13 @@
modules_without_tests = []
modules_without_icons = []
modules_using_deprecated = []
modules_without_py3 = []
with open(os.path.join(os.path.dirname(__file__), 'py3-compatible.modules')) as p:
modules_py3_compatible = [m.strip().strip('/')
for m in p.readlines()
if not m.startswith('#')]
for name, module in weboob.modules_loader.loaded.items():
path = module.package.__path__[0]
......@@ -32,6 +39,8 @@
if subprocess.call(['grep', '-q', '-r', 'weboob.deprecated.browser', path]) == 0:
modules_using_deprecated.append(name)
if name not in modules_without_py3:
modules_without_py3.append(name)
if modules_without_tests:
......@@ -40,7 +49,9 @@
print('\nModules without icons: %s' % ', '.join(sorted(modules_without_icons)))
if modules_using_deprecated:
print('\nModules using deprecated Browser 1: %s' % ', '.join(sorted(modules_using_deprecated)))
if modules_without_py3:
print('\nModules for Python 2 only: %s' % ', '.join(sorted(modules_without_py3)))
if modules_without_tests or modules_without_icons or modules_using_deprecated:
if modules_without_tests or modules_without_icons or modules_using_deprecated or modules_without_py3:
sys.exit(1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment