1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Update pre-commit hooks configuration to use ruff instead of black

This commit is contained in:
Jakub Marcowski
2024-05-21 15:14:59 +02:00
committed by Thaddeus Crews
parent aaa4560729
commit d9f8ef68df
47 changed files with 244 additions and 241 deletions

View File

@@ -1,4 +1,5 @@
import os, json
import json
import os
from SCons.Util import WhereIs
@@ -24,13 +25,13 @@ def get_build_version():
import version
name = "custom_build"
if os.getenv("BUILD_NAME") != None:
if os.getenv("BUILD_NAME") is not None:
name = os.getenv("BUILD_NAME")
v = "%d.%d" % (version.major, version.minor)
if version.patch > 0:
v += ".%d" % version.patch
status = version.status
if os.getenv("GODOT_VERSION_STATUS") != None:
if os.getenv("GODOT_VERSION_STATUS") is not None:
status = str(os.getenv("GODOT_VERSION_STATUS"))
v += ".%s.%s" % (status, name)
return v