File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1010PER_FILE_CACHES = []
1111
1212
13- def _per_file_cache (func ):
13+ def per_file_cache (func ):
1414 memoized_func = lru_cache (maxsize = None )(func )
1515 PER_FILE_CACHES .append (memoized_func )
1616 return memoized_func
@@ -38,7 +38,7 @@ def _clean_heuristic(paragraph, regex):
3838 paragraph = paragraph [: candidate .start ()] + paragraph [candidate .end () :]
3939
4040
41- @_per_file_cache
41+ @per_file_cache
4242def clean_paragraph (paragraph ):
4343 """Removes all good constructs, so detectors can focus on bad ones.
4444
@@ -54,7 +54,7 @@ def clean_paragraph(paragraph):
5454 return paragraph .replace ("\x00 " , "\\ " )
5555
5656
57- @_per_file_cache
57+ @per_file_cache
5858def escape2null (text ):
5959 r"""Return a string with escape-backslashes converted to nulls.
6060
@@ -88,7 +88,7 @@ def escape2null(text):
8888 start = found + 2 # skip character after escape
8989
9090
91- @_per_file_cache
91+ @per_file_cache
9292def paragraphs (lines ):
9393 """Yield (paragraph_line_no, paragraph_text) pairs describing
9494 paragraphs of the given lines.
@@ -216,7 +216,7 @@ def hide_non_rst_blocks(lines, hidden_block_cb=None):
216216_starts_with_substitution_definition = re .compile (r"\.\. \|[^\|]*\| " ).match
217217
218218
219- @_per_file_cache
219+ @per_file_cache
220220def type_of_explicit_markup (line ):
221221 """Tell apart various explicit markup blocks."""
222222 line = line .lstrip ()
You can’t perform that action at this time.
0 commit comments