TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.57k stars 244 forks source link

At least 7 Python files contain SyntaxErrors #979

Open cclauss opened 3 years ago

cclauss commented 3 years ago

These are in joyent/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 commented 2 years ago

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

cclauss commented 2 years ago

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