Skip to content

Commit

Permalink
Allow disabling use of __coconut_cache__
Browse files Browse the repository at this point in the history
  • Loading branch information
evhub committed Jul 22, 2024
1 parent 916d4f5 commit 7ea0163
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions coconut/_pyparsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
never_clear_incremental_cache,
warn_on_multiline_regex,
num_displayed_timing_items,
use_cache_file,
use_pyparsing_cache_file,
use_line_by_line_parser,
incremental_use_hybrid,
)
Expand Down Expand Up @@ -254,7 +254,7 @@ def enableIncremental(*args, **kwargs):
and hasattr(MatchFirst, "setAdaptiveMode")
)

USE_CACHE = SUPPORTS_INCREMENTAL and use_cache_file
USE_CACHE = SUPPORTS_INCREMENTAL and use_pyparsing_cache_file
USE_LINE_BY_LINE = USE_COMPUTATION_GRAPH and use_line_by_line_parser

if MODERN_PYPARSING:
Expand Down
4 changes: 2 additions & 2 deletions coconut/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def get_path_env_var(env_var, default):

streamline_grammar_for_len = 1536

use_cache_file = True
use_pyparsing_cache_file = True

adaptive_any_of_env_var = "COCONUT_ADAPTIVE_ANY_OF"
use_adaptive_any_of = get_bool_env_var(adaptive_any_of_env_var, True)
Expand Down Expand Up @@ -638,7 +638,7 @@ def get_path_env_var(env_var, default):
main_prompt = ">>> "
more_prompt = " "

default_use_cache_dir = PY34
default_use_cache_dir = get_bool_env_var("COCONUT_USE_COCONUT_CACHE", PY34)
coconut_cache_dir = "__coconut_cache__"

mypy_path_env_var = "MYPYPATH"
Expand Down

0 comments on commit 7ea0163

Please sign in to comment.