You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
with source file contain this (for reproducing the problem) :
class test():
def test():
s=func()
(s).test = "test"
print a
def test2(b):
print b
I have this error :
# pyminifier --outfile /tmp/file.py src/test.py
Traceback (most recent call last):
File "/usr/local/bin/pyminifier", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pyminifier/__main__.py", line 202, in main
pyminify(options, files)
File "/usr/local/lib/python3.11/dist-packages/pyminifier/__init__.py", line 332, in pyminify
source = minification.minify(tokens, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pyminifier/minification.py", line 432, in minify
result = dedent(result, use_tabs=options.tabs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pyminifier/minification.py", line 315, in dedent
for i, tok in enumerate(tokenize.generate_tokens(io_obj.readline)):
File "/usr/lib/python3.11/tokenize.py", line 516, in _tokenize
raise IndentationError(
File "<tokenize>", line 6
def test2(b):
IndentationError: unindent does not match any outer indentation level
with source file contain this (for reproducing the problem) :
I have this error :
After reduce_operators function (https://github.com/dzhuang/pyminifier3/blob/main/pyminifier/minification.py#L428)
I've write result into file, and this is the result :
Probably the function reduce_operators remove all space before parenthesis and indentation is not correct after processing
The text was updated successfully, but these errors were encountered: