Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Seven contrib files with Python syntax errors #5443

Closed
cclauss opened this issue Jun 12, 2019 · 2 comments
Closed

Seven contrib files with Python syntax errors #5443

cclauss opened this issue Jun 12, 2019 · 2 comments
Labels
Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution z-p3 (Deprecated Label)

Comments

@cclauss
Copy link
Contributor

cclauss commented Jun 12, 2019

flake8 testing of https://github.com/matrix-org/synapse on Python 3.7.1

$ flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics

./contrib/jitsimeetbridge/jitsimeetbridge.py:1:1: E902 IndentationError: unindent does not match any outer indentation level
#!/usr/bin/env python
^
./contrib/jitsimeetbridge/jitsimeetbridge.py:54:40: E999 SyntaxError: invalid syntax
            print "incoming from matrix",obj
                                       ^
./contrib/graph/graph.py:51:39: E999 SyntaxError: invalid syntax
            print "Run out of colours!"
                                      ^
./contrib/graph/graph3.py:29:25: E999 SyntaxError: invalid syntax
    print "Reading lines"
                        ^
./contrib/scripts/kick_users.py:16:56: E999 SyntaxError: invalid syntax
    print "Kicking members on %s in room %s matching %s" % (hs, room_id, user_id_prefix)
                                                       ^
./contrib/cmdclient/http.py:144:40: E999 SyntaxError: invalid syntax
        print "%s to %s with headers %s" % (method, url, headers_dict)
                                       ^
./contrib/cmdclient/console.py:112:22: E999 SyntaxError: invalid syntax
            print json.dumps(self.config, indent=4)
                     ^
1     E902 IndentationError: unindent does not match any outer indentation level
6     E999 SyntaxError: invalid syntax
7

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.

  • F821: undefined name name
  • F822: undefined name name in __all__
  • F823: local variable name referenced before assignment
  • E901: SyntaxError or IndentationError
  • E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
@cclauss cclauss changed the title Seven files with Python syntax errors Seven contrib files with Python syntax errors Jun 12, 2019
@richvdh
Copy link
Member

richvdh commented Jun 12, 2019

Well, the whole point of the contrib section is that we don't promise to maintain it. They are mostly scripts which other people have contributed. I mean, we're not going to turn away PRs to fix them, but we also aren't going to fix them ourselves.

@neilisfragile neilisfragile added z-p3 (Deprecated Label) Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution maintenance labels Jun 14, 2019
@hawkowl
Copy link
Contributor

hawkowl commented Jun 17, 2019

The syntax errors listed are fixed (although it doesn't mean that the scripts fully work on py3)

@hawkowl hawkowl closed this as completed Jun 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution z-p3 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

4 participants