use pathlib

This commit is contained in:
2026-06-24 17:13:16 -04:00
parent 05e443a528
commit 221d6021ac
3 changed files with 11 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import random
from collections import defaultdict
from untitled import content, rules
from untitled import PACKAGE_ROOT, content, rules
def generate_trait_sentence(traits):
@@ -71,7 +71,7 @@ def generate_name():
def _load_raw_names():
names = []
with open("untitled/assets/cat_names.txt") as f:
with open(PACKAGE_ROOT / "assets" / "cat_names.txt") as f:
for name in f.readlines():
names.append(name.strip())
return names