From 6e3dd6487621c398d6a9a54cffc8134e3c3b1d1b Mon Sep 17 00:00:00 2001 From: Meinard Francisco <44516102+znarfm@users.noreply.github.com> Date: Sun, 21 Jul 2024 23:54:56 +0800 Subject: [PATCH] hotfix: `package` argument for `resources.files()` (for python < 3.12) (#49) resources.files requires a positional argument in python versions before 3.12 --- bing_rewards/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bing_rewards/__init__.py b/bing_rewards/__init__.py index 1d34852..90e6a5f 100644 --- a/bing_rewards/__init__.py +++ b/bing_rewards/__init__.py @@ -50,7 +50,7 @@ def word_generator() -> Generator[str]: Starts reading from a random position in the file. If end of file is reached, close and restart. """ - word_data = resources.files().joinpath('data', 'keywords.txt') + word_data = resources.files('bing_rewards').joinpath('data', 'keywords.txt') while True: with ( resources.as_file(word_data) as p,