Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At least 7 Python files contain SyntaxErrors #979

Open
cclauss opened this issue Mar 16, 2021 · 2 comments
Open

At least 7 Python files contain SyntaxErrors #979

cclauss opened this issue Mar 16, 2021 · 2 comments

Comments

@cclauss
Copy link

cclauss commented Mar 16, 2021

These are in TritonDataCenter/javascriptlint#25 and trentm/node-bunyan#663

% flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

./smartos-live/tools/javascriptlint/javascriptlint/jsl.py:30:15: E999 SyntaxError: invalid syntax
        print util.format_error(conf_['output-format'], path, line, col,
              ^
./smartos-live/tools/javascriptlint/javascriptlint/jsparse.py:256:15: E999 SyntaxError: invalid syntax
        print '     '*depth,
              ^
./smartos-live/tools/javascriptlint/javascriptlint/lint.py:305:19: E999 SyntaxError: invalid syntax
            print normpath
                  ^
./smartos-live/tools/javascriptlint/javascriptlint/conf.py:116:24: E999 SyntaxError: invalid syntax
        raise ConfError, 'This setting is deprecated.'
                       ^
./smartos-live/tools/javascriptlint/javascriptlint/fs.py:8:36: F821 undefined name 'unicode'
    if contents and contents[0] == unicode(codecs.BOM_UTF8, 'utf8'):
                                   ^
./smartos-live/tools/javascriptlint/javascriptlint/visitation.py:30:29: E999 SyntaxError: invalid syntax
            raise ValueError, 'class names must be lowercase'
                            ^
./smartos-live/tools/javascriptlint/javascriptlint/warnings.py:107:23: E999 SyntaxError: invalid syntax
        raise KeyError, 'Invalid keyword in error: ' + errdesc
                      ^
./smartos-live/src/node-bunyan/tools/cutarelease.py:114:15: E999 SyntaxError: invalid syntax
        print "* * *"
              ^
7     E999 SyntaxError: invalid syntax
1     F821 undefined name 'unicode'
8
@tuffnatty
Copy link

There is no syntax error, it's just plain Python 2.

@cclauss
Copy link
Author

cclauss commented Apr 4, 2022

These modifications are compatible with both Python 2 and Python 3.

Python 2 died 824 days ago on 1/1/2020 so it is often no longer available in modern operating systems.

Currently supported versions of Python: https://devguide.python.org/#status-of-python-branches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants