Skip to content

Commit

Permalink
hotfix: package argument for resources.files() (for python < 3.12) (
Browse files Browse the repository at this point in the history
#49)

resources.files requires a positional argument in python versions before 3.12
  • Loading branch information
znarfm authored Jul 21, 2024
1 parent a0c01e3 commit 6e3dd64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bing_rewards/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6e3dd64

Please sign in to comment.