Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat using black #73

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
415 changes: 316 additions & 99 deletions fast64_internal/f3d/f3d_constants.py

Large diffs are not rendered by default.

546 changes: 271 additions & 275 deletions fast64_internal/f3d/f3d_enums.py

Large diffs are not rendered by default.

12,855 changes: 7,693 additions & 5,162 deletions fast64_internal/f3d/f3d_gbi.py

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions fast64_internal/f3d/f3d_generate_presets.py
@@ -1,29 +1,29 @@
import os

basePath = 'presets/f3d'
data = ''
basePath = "presets/f3d"
data = ""
presetList = "material_presets = {\n"

for subdir in os.listdir(basePath):
subPath = os.path.join(basePath, subdir)
if subdir != '__pycache__' and subdir != 'user' and os.path.isdir(subPath):
presetList += '\t"' + subdir + '" : {\n'
for filename in os.listdir(subPath):
presetPath = os.path.join(subPath, filename)
if os.path.isfile(presetPath):
print(presetPath)
presetFile = open(presetPath, 'r')
presetData = presetFile.read()
presetFile.close()
subPath = os.path.join(basePath, subdir)
if subdir != "__pycache__" and subdir != "user" and os.path.isdir(subPath):
presetList += '\t"' + subdir + '" : {\n'
for filename in os.listdir(subPath):
presetPath = os.path.join(subPath, filename)
if os.path.isfile(presetPath):
print(presetPath)
presetFile = open(presetPath, "r")
presetData = presetFile.read()
presetFile.close()

data += filename[:-3] + " = '''\n" + presetData + "'''\n\n"
presetList += '\t\t"' + filename[:-3] + '" : ' + filename[:-3] + ',\n'
presetList += '\t},\n'
data += filename[:-3] + " = '''\n" + presetData + "'''\n\n"
presetList += '\t\t"' + filename[:-3] + '" : ' + filename[:-3] + ",\n"
presetList += "\t},\n"

presetList += '}\n'
presetList += "}\n"

data += presetList

outFile = open('f3d_material_presets.py', 'w')
outFile = open("f3d_material_presets.py", "w")
outFile.write(data)
outFile.close()
outFile.close()