ajenti / ajenti

Re-definition found for builtin function PYL-W0622
Anti-pattern
Minor
6 months ago4 years old
Redefining built-in 'hash'
 83
 84    def update_password(self, username, password):
 85        if username in aj.users.data['users']:
 86            hash = self.hash_password(password.encode('utf-8')) 87            aj.users.data['users'][username]['password'] = hash
 88            aj.users.save()
 89            return True
Redefining built-in 'vars'
136        with open(logo_path, "rb") as image:
137            base64_logo = base64.b64encode(image.read()).decode()
138
139        vars = {140            'BASE64_LOGO': base64_logo,
141            'RESET_LINK': link,
142        }
Redefining built-in 'vars'
 94
 95        return template_path
 96
 97    def render_template(self, template_path, vars=None): 98        """
 99        Use Jinja2 template engine to render the HTML template.
100        Use BeautifulSoup to generate the plain text content with the html content.