Fix the following SonarQube code smells:

1) Use the "RegExp.exec()" method instead.
2) Remove parameter form or provide default value.
3) Extract this nested ternary operation into an independent statement.
4) Replace this character class by the character itself.
5) Unnecessary use of conditional expression for default assignment.
6) Prefer using an optional chain expression instead, as it's more concise and easier to read.
This commit is contained in:
Akshay Joshi
2024-06-11 18:07:22 +05:30
parent bdf4f39b2b
commit df2f3460f0
17 changed files with 102 additions and 69 deletions

View File

@@ -41,7 +41,7 @@ class BaseAuthentication(metaclass=AuthSourceRegistry):
pass
@abstractmethod
def authenticate(self):
def authenticate(self, form):
pass
def validate(self, form):