瀏覽代碼

Linting and scope check fixes.

Joe Clarke 1 年之前
父節點
當前提交
1bb677d3a5
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      automation/services/remove_scopes.py

+ 2 - 3
automation/services/remove_scopes.py

@@ -25,11 +25,10 @@
 # SUCH DAMAGE.
 
 import sys
-import json
 from subprocess import Popen, PIPE
 import re
 import shlex
-from cleu.config import Config as C
+from cleu.config import Config as C  # type: ignore
 
 if __name__ == "__main__":
     match = None
@@ -51,8 +50,8 @@ if __name__ == "__main__":
         sys.exit(1)
     scopes = out.decode("utf-8").split("\n")
     for scope in scopes:
+        scope = scope.strip()
         if scope != "100 Ok" and re.search(r"^\w", scope):
-            scope = scope.strip()
             delete = True
             if match and not re.search(match, scope):
                 delete = False