You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/12/08 00:00:16 UTC

[GitHub] [incubator-superset] mistercrunch commented on a change in pull request #8774: Re-enable pylint for common, connector, and test files

mistercrunch commented on a change in pull request #8774: Re-enable pylint for common, connector, and test files
URL: https://github.com/apache/incubator-superset/pull/8774#discussion_r355150782
 
 

 ##########
 File path: superset/cli.py
 ##########
 @@ -212,23 +211,23 @@ def import_dashboards(path, recursive, username):
     """Import dashboards from JSON"""
     from superset.utils import dashboard_import_export
 
-    p = Path(path)
+    pth = Path(path)
     files = []
-    if p.is_file():
-        files.append(p)
-    elif p.exists() and not recursive:
-        files.extend(p.glob("*.json"))
-    elif p.exists() and recursive:
-        files.extend(p.rglob("*.json"))
+    if pth.is_file():
+        files.append(pth)
+    elif pth.exists() and not recursive:
+        files.extend(pth.glob("*.json"))
+    elif pth.exists() and recursive:
+        files.extend(pth.rglob("*.json"))
     if username is not None:
         g.user = security_manager.find_user(username=username)
-    for f in files:
-        logging.info("Importing dashboard from file %s", f)
+    for _file in files:
 
 Review comment:
   `f` is pretty standard as a generic file variable name, kind of like `l = []`. I'd vote to add to the list of allowed short variable names

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org