use pathlib
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user