File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,9 @@ def normalize_path(path, parent=os.curdir):
197
197
return path .rstrip (separator + alternate_separator )
198
198
199
199
200
- def _stdin_get_value_py3 (): # type: () -> str
200
+ @functools .lru_cache (maxsize = 1 )
201
+ def stdin_get_value (): # type: () -> str
202
+ """Get and cache it so plugins can use it."""
201
203
stdin_value = sys .stdin .buffer .read ()
202
204
fd = io .BytesIO (stdin_value )
203
205
try :
@@ -208,12 +210,6 @@ def _stdin_get_value_py3(): # type: () -> str
208
210
return stdin_value .decode ("utf-8" )
209
211
210
212
211
- @functools .lru_cache (maxsize = 1 )
212
- def stdin_get_value (): # type: () -> str
213
- """Get and cache it so plugins can use it."""
214
- return _stdin_get_value_py3 ()
215
-
216
-
217
213
def stdin_get_lines (): # type: () -> List[str]
218
214
"""Return lines of stdin split according to file splitting."""
219
215
return list (io .StringIO (stdin_get_value ()))
You can’t perform that action at this time.
0 commit comments