yapf lint

This commit is contained in:
lukew3
2023-06-02 10:31:59 -04:00
parent c6ddbbade9
commit 966419d04c
13 changed files with 108 additions and 108 deletions

View File

@@ -1,6 +1,7 @@
import os
print("You are about to add a new generator to the table in futureGenerators.md")
print(
"You are about to add a new generator to the table in futureGenerators.md")
print("Please fill out the following:")
title = input("> Title: ")
example_problem = input("> Example Problem: ")
@@ -14,4 +15,5 @@ else:
with open(file, 'a') as f:
f.writelines(
f'| {title} | {example_problem} | {example_solution} | {further_explanation} |\n')
f'| {title} | {example_problem} | {example_solution} | {further_explanation} |\n'
)

View File

@@ -18,15 +18,17 @@ def get_filepaths(subject_name):
# Join the two strings in order to form the full filepath.
filepath = os.path.join(root, filename)
front_len = 24+len(subject_name)
front_len = 24 + len(subject_name)
filename = filepath[front_len:-3]
file_paths.append(filename) # Add it to the list.
return file_paths
subjects = ['algebra', 'basic_math', 'calculus',
'computer_science', 'geometry', 'misc', 'statistics']
subjects = [
'algebra', 'basic_math', 'calculus', 'computer_science', 'geometry',
'misc', 'statistics'
]
for subject in subjects:
full_file_paths = get_filepaths(subject)
full_file_paths.sort()

View File

@@ -142,7 +142,7 @@ def main():
for write_line in write_list:
lines.append(write_line)
with open('../README.md', "w", encoding = 'utf-8') as g:
with open('../README.md', "w", encoding='utf-8') as g:
g.writelines(lines)
print("New README.md table generated")

View File

@@ -1,4 +1,4 @@
# Use this file to determine which ID to use for the next generator that you add
from mathgenerator import mathgen
print(mathgen.getGenList()[-1][0]+1)
print(mathgen.getGenList()[-1][0] + 1)

View File

@@ -1,7 +1,7 @@
import os
name = 'computer_science'
with open (f'/home/luke/src/mathgenerator/mathgenerator/{name}.py', 'w') as f:
with open(f'/home/luke/src/mathgenerator/mathgenerator/{name}.py', 'w') as f:
source_dir_path = f'/home/luke/src/mathgenerator/mathgenerator/{name}'
files = os.listdir(source_dir_path)
for file in sorted(files):