Skip to content

Commit 889227b

Browse files
committed
Large codeblocks restructure
Remove unnecessary requirements Breaks Pylint3.x!
1 parent 212334a commit 889227b

File tree

8 files changed

+614
-646
lines changed

8 files changed

+614
-646
lines changed

app/__main__.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
"""Module for building and build-time QA of the python tutorial website"""
2+
import inspect
23
import json
34
from os import makedirs
45
import sys
56

6-
from app.codeblocks import codeblocks
7+
from app.codeblocks import get_func_body
8+
from app.pages import first_steps, first_projects, variables
79
from app.qa import CodeblocksTester, BuildTestFailure
810

911

12+
PAGE_MODULES = (
13+
first_steps,
14+
first_projects,
15+
variables,
16+
)
17+
18+
1019
def run_build_checks():
1120
"""QA for build process"""
12-
testers = (
13-
CodeblocksTester(),
14-
)
21+
testers = (CodeblocksTester(PAGE_MODULES),)
1522
fail = False
1623
for tester in testers:
1724
try:
@@ -29,7 +36,10 @@ def main():
2936
run_build_checks()
3037
makedirs('dist', exist_ok=True)
3138
with open('dist/codeblocks.json', 'w', encoding='utf-8') as f:
32-
json.dump(codeblocks, f)
39+
json.dump(get_func_body, f)
40+
for module in PAGE_MODULES:
41+
for fn_name, fn in inspect.getmembers(module):
42+
print(fn_name, fn)
3343

3444

3545
if __name__ == '__main__':

0 commit comments

Comments
 (0)