This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new cd77797  Removed disabled linting redefined-outer-name. Url parameters 
are renamed where url was already defined in class attributes (#10911)
cd77797 is described below

commit cd777978028629c78bba85bf4617c28a14706e3f
Author: Kasia Kucharczyk <[email protected]>
AuthorDate: Thu Sep 17 05:22:46 2020 +0200

    Removed disabled linting redefined-outer-name. Url parameters are renamed 
where url was already defined in class attributes (#10911)
---
 superset/models/core.py | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/superset/models/core.py b/superset/models/core.py
index 4379a20..ed6f176 100755
--- a/superset/models/core.py
+++ b/superset/models/core.py
@@ -262,10 +262,8 @@ class Database(
         return cls.get_password_masked_url(sqlalchemy_url)
 
     @classmethod
-    def get_password_masked_url(
-        cls, url: URL  # pylint: disable=redefined-outer-name
-    ) -> URL:
-        url_copy = deepcopy(url)
+    def get_password_masked_url(cls, masked_url: URL) -> URL:
+        url_copy = deepcopy(masked_url)
         if url_copy.password is not None:
             url_copy.password = PASSWORD_MASK
         return url_copy
@@ -279,19 +277,17 @@ class Database(
         self.sqlalchemy_uri = str(conn)  # hides the password
 
     def get_effective_user(
-        self,
-        url: URL,  # pylint: disable=redefined-outer-name
-        user_name: Optional[str] = None,
+        self, object_url: URL, user_name: Optional[str] = None,
     ) -> Optional[str]:
         """
         Get the effective user, especially during impersonation.
-        :param url: SQL Alchemy URL object
+        :param object_url: SQL Alchemy URL object
         :param user_name: Default username
         :return: The effective username
         """
         effective_username = None
         if self.impersonate_user:
-            effective_username = url.username
+            effective_username = object_url.username
             if user_name:
                 effective_username = user_name
             elif (

Reply via email to