aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/utils.py
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-21 19:06:18 -0500
committermat <github@matdoes.dev>2022-06-21 19:06:18 -0500
commitaf7a7b428c60021e1ef717dd7dc3888c21188693 (patch)
treee41a4c573cf29334d94976cdfb25595e6c595375 /codegen/lib/utils.py
parenta1484f66290517b6c36f2e82c92613f23d2c4935 (diff)
parent317567b77a9e339b5dc9a4832b1ce4c6b045dfe7 (diff)
downloadazalea-drasl-af7a7b428c60021e1ef717dd7dc3888c21188693.tar.xz
Merge branch 'main' into 1.19.1
Diffstat (limited to 'codegen/lib/utils.py')
-rw-r--r--codegen/lib/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/codegen/lib/utils.py b/codegen/lib/utils.py
index 3887bb35..c3d293c0 100644
--- a/codegen/lib/utils.py
+++ b/codegen/lib/utils.py
@@ -18,9 +18,11 @@ def to_camel_case(name: str):
s = f'_{s}'
return s
+
def upper_first_letter(name: str):
return name[0].upper() + name[1:]
+
def padded_hex(n: int):
return f'0x{n:02x}'
@@ -55,4 +57,4 @@ def group_packets(packets: list[PacketIdentifier]):
def get_dir_location(name: str):
- return os.path.join(os.path.dirname(__file__), '..', name)
+ return os.path.join(os.path.dirname(os.path.dirname(__file__)), name)