File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,15 @@ def write_tree_content(f: TextIO) -> None:
4444 # Write to stdout with proper UTF-8 encoding
4545 # On Windows, sys.stdout might use cp1252 encoding which can't handle Unicode
4646 # We need to ensure UTF-8 encoding for proper Unicode support
47- if hasattr (sys .stdout , ' reconfigure' ):
47+ if hasattr (sys .stdout , " reconfigure" ):
4848 # Python 3.7+ has reconfigure method
49- sys .stdout .reconfigure (encoding = ' utf-8' )
49+ sys .stdout .reconfigure (encoding = " utf-8" )
5050 write_tree_content (sys .stdout )
5151 else :
5252 # Fallback for older Python versions or systems without reconfigure
5353 import io
54- utf8_stdout = io .TextIOWrapper (sys .stdout .buffer , encoding = 'utf-8' )
54+
55+ utf8_stdout = io .TextIOWrapper (sys .stdout .buffer , encoding = "utf-8" )
5556 write_tree_content (utf8_stdout )
5657 utf8_stdout .flush ()
5758 logging .info ("Directory tree written to stdout" )
You can’t perform that action at this time.
0 commit comments