Style: Apply fixes from black and codespell

This commit is contained in:
Rémi Verschelde
2025-04-25 14:52:54 +02:00
parent 580d87b837
commit 9a8b5848d8
69 changed files with 85 additions and 117 deletions

View File

@@ -19,9 +19,9 @@
import os
from array import array
# Generates a C++ file from the specified binary resource file
def generate(in_path, out_path):
namespace = "oidn::weights"
scopes = namespace.split("::")

View File

@@ -142,7 +142,7 @@ ENetConnection::EventType ENetConnection::_parse_event(const ENetEvent &p_event,
return EVENT_ERROR;
} break;
case ENET_EVENT_TYPE_RECEIVE: {
// Packet reveived.
// Packet received.
if (p_event.peer->data != nullptr) {
Ref<ENetPacketPeer> pp = Ref<ENetPacketPeer>((ENetPacketPeer *)p_event.peer->data);
r_event.peer = Ref<ENetPacketPeer>((ENetPacketPeer *)p_event.peer->data);

View File

@@ -1566,7 +1566,7 @@ struct SignatureHelp {
/**
* The active signature. If omitted or the value lies outside the
* range of `signatures` the value defaults to zero or is ignored if
* `signatures.length === 0`. Whenever possible implementors should
* `signatures.length === 0`. Whenever possible implementers should
* make an active decision about the active signature and shouldn't
* rely on a default value.
* In future version of the protocol this property might become

View File

@@ -1,4 +1,4 @@
func test():
var unconvertable := 1
var typed: Array[Object] = [unconvertable]
var unconvertible := 1
var typed: Array[Object] = [unconvertible]
print('not ok')

View File

@@ -3740,7 +3740,7 @@ void BindingsGenerator::_populate_builtin_type_interfaces() {
builtin_types.insert(itype.cname, itype);
// Array_@generic
// Re-use Array's itype
// Reuse Array's itype
itype.name = "Array_@generic";
itype.cname = itype.name;
itype.cs_out = "%5return new %2(%0(%1));";
@@ -3767,7 +3767,7 @@ void BindingsGenerator::_populate_builtin_type_interfaces() {
builtin_types.insert(itype.cname, itype);
// Dictionary_@generic
// Re-use Dictionary's itype
// Reuse Dictionary's itype
itype.name = "Dictionary_@generic";
itype.cname = itype.name;
itype.cs_out = "%5return new %2(%0(%1));";

View File

@@ -37,7 +37,7 @@
#include "servers/rendering/rendering_server_globals.h"
#include "servers/rendering_server.h"
// OpenXR requires us to submit sRGB textures so that it recognises the content
// OpenXR requires us to submit sRGB textures so that it recognizes the content
// as being in sRGB color space. We do fall back on "normal" textures but this
// will likely result in incorrect colors as OpenXR will double the sRGB conversion.
// All major XR runtimes support sRGB textures.

View File

@@ -310,7 +310,7 @@ bool OpenXRAPI::create_instance() {
for (auto &requested_extension : requested_extensions) {
if (!is_extension_supported(requested_extension.key)) {
if (requested_extension.value == nullptr) {
// nullptr means this is a manditory extension so we fail
// nullptr means this is a mandatory extension so we fail
ERR_FAIL_V_MSG(false, String("OpenXR: OpenXR Runtime does not support ") + requested_extension.key + String(" extension!"));
} else {
// set this extension as not supported
@@ -788,7 +788,7 @@ bool OpenXRAPI::create_swapchains() {
Also Godot only creates a swapchain for the main output.
OpenXR will require us to create swapchains as the render target for additional viewports if we want to use the layer system
to optimize text rendering and background rendering as OpenXR may choose to re-use the results for reprojection while we're
to optimize text rendering and background rendering as OpenXR may choose to reuse the results for reprojection while we're
already rendering the next frame.
Finally an area we need to expand upon is that Foveated rendering is only enabled for the swap chain we create,
@@ -1660,7 +1660,7 @@ bool OpenXRAPI::process() {
}
bool OpenXRAPI::acquire_image(OpenXRSwapChainInfo &p_swapchain) {
ERR_FAIL_COND_V(p_swapchain.image_acquired, true); // this was not released when it should be, error out and re-use...
ERR_FAIL_COND_V(p_swapchain.image_acquired, true); // this was not released when it should be, error out and reuse...
XrResult result;
XrSwapchainImageAcquireInfo swapchain_image_acquire_info = {

View File

@@ -287,7 +287,7 @@ private:
bool on_state_loss_pending();
bool on_state_exiting();
// convencience
// convenience
void copy_string_to_char_buffer(const String p_string, char *p_buffer, int p_buffer_len);
public:

View File

@@ -99,8 +99,8 @@ def make_icu_data(target, source, env):
def write_macos_plist(target, binary_name, identifier, name):
os.makedirs(f"{target}/Resourece/", exist_ok=True)
f = open(f"{target}/Resourece/Info.plist", "w")
os.makedirs(f"{target}/Resource/", exist_ok=True)
f = open(f"{target}/Resource/Info.plist", "w")
f.write(f'<?xml version="1.0" encoding="UTF-8"?>\n')
f.write(f'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n')

View File

@@ -99,8 +99,8 @@ def make_icu_data(target, source, env):
def write_macos_plist(target, binary_name, identifier, name):
os.makedirs(f"{target}/Resourece/", exist_ok=True)
f = open(f"{target}/Resourece/Info.plist", "w")
os.makedirs(f"{target}/Resource/", exist_ok=True)
f = open(f"{target}/Resource/Info.plist", "w")
f.write(f'<?xml version="1.0" encoding="UTF-8"?>\n')
f.write(f'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n')