Format files using GDScript Toolkit

This commit is contained in:
Leroy Hopson 2023-01-21 11:34:39 +13:00
parent 9f269aec8c
commit e563a15ce2
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
52 changed files with 3459 additions and 2454 deletions

View file

@ -71,16 +71,15 @@ class TestTheme:
func _get_pixelv(src: Vector2) -> Color:
var screen := get_tree().root.get_texture().get_data()
false # screen.lock() # TODOConverter40, Image no longer requires locking, `false` helps to not break one line if/else, so it can freely be removed
false # screen.lock() # TODOConverter40, Image no longer requires locking, `false` helps to not break one line if/else, so it can freely be removed
screen.flip_y()
var pixel := screen.get_pixelv(src)
false # screen.unlock() # TODOConverter40, Image no longer requires locking, `false` helps to not break one line if/else, so it can freely be removed
false # screen.unlock() # TODOConverter40, Image no longer requires locking, `false` helps to not break one line if/else, so it can freely be removed
return pixel
func _check_colors(theme: Theme):
var cell_size := Vector2(
int(terminal.size.x / terminal.get_cols()),
int(terminal.size.y / terminal.get_rows())
int(terminal.size.x / terminal.get_cols()), int(terminal.size.y / terminal.get_rows())
)
var src := cell_size / 2

View file

@ -137,7 +137,7 @@ func test_emits_exited_signal_when_child_process_exits():
class Helper:
static func _get_pts() -> Array:
assert(false) #,"Abstract method")
assert(false) #,"Abstract method")
return []
static func _get_winsize(fd: int) -> Dictionary:
@ -161,7 +161,7 @@ class Helper:
true,
output
)
assert(exit_code == 0) #,"Failed to run python command for this test.")
assert(exit_code == 0) #,"Failed to run python command for this test.")
var size = str_to_var("Vector2" + output[0].strip_edges())
return {rows = int(size.x), cols = int(size.y)}
@ -228,8 +228,8 @@ class LinuxHelper:
static func _get_pts() -> Array:
var dir := Directory.new()
if dir.open("/dev/pts") != OK or dir.list_dir_begin() != OK:# TODOGODOT4 fill missing arguments https://github.com/godotengine/godot/pull/40547
assert(false) #,"Could not open /dev/pts.")
if dir.open("/dev/pts") != OK or dir.list_dir_begin() != OK: # TODOGODOT4 fill missing arguments https://github.com/godotengine/godot/pull/40547
assert(false) #,"Could not open /dev/pts.")
var pts := []
var file_name: String = dir.get_next()
@ -249,5 +249,5 @@ class MacOSHelper:
# TODO: Implement for macOS.
# On macOS there is no /dev/pts directory, rather new ptys are created
# under /dev/ttysXYZ.
assert(false) #,"Not implemented")
assert(false) #,"Not implemented")
return []