Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
NasalDaemon committed Feb 5, 2025
1 parent a56d144 commit e3a0a4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lark/lark.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class Lark(Serialize):
def __init__(self, grammar: 'Union[Grammar, str, IO[str]]', **options) -> None:
self.options = LarkOptions(options)
if self.options.cache_grammar:
self.__serialize_fields__ += 'grammar'
self.__serialize_fields__.append('grammar')
re_module: types.ModuleType

# Set regex or re module
Expand Down Expand Up @@ -341,7 +341,7 @@ def __init__(self, grammar: 'Union[Grammar, str, IO[str]]', **options) -> None:
username = "unknown"


cache_fn = tempfile.gettempdir() + "/.lark_%s_%s_%s_%s_%s_%s.tmp" % (
cache_fn = tempfile.gettempdir() + "/.lark_%s_%s_%s_%s_%s.tmp" % (
"cache_grammar" if self.options.cache_grammar else "cache", username, cache_sha256, *sys.version_info[:2])

old_options = self.options
Expand Down

0 comments on commit e3a0a4f

Please sign in to comment.