summary refs log tree commit diff
path: root/scripts-dev/list_url_patterns.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-10-20 11:16:55 +1100
committerGitHub <noreply@github.com>2018-10-20 11:16:55 +1100
commite1728dfcbe585edfb590bce50adeaab341a70db8 (patch)
tree0ae215c46f15ecc917bf45d75430298a003b0e27 /scripts-dev/list_url_patterns.py
parentMerge branch 'rav/fix_email_templates_4065' into develop (diff)
downloadsynapse-e1728dfcbe585edfb590bce50adeaab341a70db8.tar.xz
Make scripts/ and scripts-dev/ pass pyflakes (and the rest of the codebase on py3) (#4068)
Diffstat (limited to 'scripts-dev/list_url_patterns.py')
-rwxr-xr-xscripts-dev/list_url_patterns.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts-dev/list_url_patterns.py b/scripts-dev/list_url_patterns.py
index 58d40c4ff4..da027be26e 100755
--- a/scripts-dev/list_url_patterns.py
+++ b/scripts-dev/list_url_patterns.py
@@ -1,18 +1,17 @@
 #! /usr/bin/python
 
-import ast
 import argparse
+import ast
 import os
 import sys
+
 import yaml
 
 PATTERNS_V1 = []
 PATTERNS_V2 = []
 
-RESULT = {
-    "v1": PATTERNS_V1,
-    "v2": PATTERNS_V2,
-}
+RESULT = {"v1": PATTERNS_V1, "v2": PATTERNS_V2}
+
 
 class CallVisitor(ast.NodeVisitor):
     def visit_Call(self, node):
@@ -21,7 +20,6 @@ class CallVisitor(ast.NodeVisitor):
         else:
             return
 
-
         if name == "client_path_patterns":
             PATTERNS_V1.append(node.args[0].s)
         elif name == "client_v2_patterns":
@@ -42,8 +40,10 @@ def find_patterns_in_file(filepath):
 parser = argparse.ArgumentParser(description='Find url patterns.')
 
 parser.add_argument(
-    "directories", nargs='+', metavar="DIR",
-    help="Directories to search for definitions"
+    "directories",
+    nargs='+',
+    metavar="DIR",
+    help="Directories to search for definitions",
 )
 
 args = parser.parse_args()