Skip to content

Commit

Permalink
Load regexp from the path relative to __file__
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarkovtsev committed Jun 7, 2021
1 parent 3896f02 commit ed82c88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def compile_regex() -> re.Pattern:
try:
with open("regexp") as fin:
with Path(__file__).with_name("regexp").open() as fin:
return re.compile(fin.read())
except FileNotFoundError:
from confusables import confusable_characters
Expand Down

0 comments on commit ed82c88

Please sign in to comment.