mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
pep8 fixes
This commit is contained in:
@@ -5,10 +5,11 @@ from mathgenerator.mathgen import *
|
||||
wList = getGenList()
|
||||
lines = []
|
||||
with open('mathgenerator/mathgen.py', 'r') as f:
|
||||
lines=f.readlines()
|
||||
lines = f.readlines()
|
||||
|
||||
allRows = []
|
||||
line = lines.index('# Funcs_start - DO NOT REMOVE!\n')+1 # get the first line of the functions in mathgen.py
|
||||
# get the first line of the functions in mathgen.py
|
||||
line = lines.index('# Funcs_start - DO NOT REMOVE!\n')+1
|
||||
for item in wList:
|
||||
myGen = item[2]
|
||||
# NOTE: renamed 'sol' to 'solu' to make it look nicer
|
||||
@@ -27,7 +28,8 @@ for item in wList:
|
||||
print(prob)
|
||||
|
||||
instName = lines[line]
|
||||
func_name = instName[:instName.find('=')].strip() # NOTE: renamed 'def_name' to 'func_name' because it suits it more
|
||||
# NOTE: renamed 'def_name' to 'func_name' because it suits it more
|
||||
func_name = instName[:instName.find('=')].strip()
|
||||
row = [myGen.id, myGen.title, prob, solu, func_name]
|
||||
# print(item[1], func_name)
|
||||
line += 1
|
||||
@@ -42,7 +44,8 @@ with open('README.md', "r") as g:
|
||||
lines = lines[:line+1]
|
||||
|
||||
for row in allRows:
|
||||
tableLine = "| " + str(row[0]) + " | " + str(row[1]) + " | " + str(row[2]) + " | " + str(row[3]) + " | " + str(row[4]) + " |\n"
|
||||
tableLine = "| " + str(row[0]) + " | " + str(row[1]) + " | " + str(
|
||||
row[2]) + " | " + str(row[3]) + " | " + str(row[4]) + " |\n"
|
||||
lines.append(tableLine)
|
||||
|
||||
with open('README.md', "w") as g:
|
||||
|
||||
Reference in New Issue
Block a user