Fixed the following SonarQube code smells:

1) Do not use the Array index in keys.
2) Import from the same module should be merged.
3) Mutable variables should not be exported.
4) Variables should not be initialized to undefined.
5) startswith or endswith method should be used.
6) Unwrap this unnecessarily grouped subpattern.

Additionally, addressed many other SonarQube rules.
This commit is contained in:
Akshay Joshi
2024-06-12 18:09:06 +05:30
parent 288fd7ed12
commit dea5335ce5
29 changed files with 51 additions and 57 deletions

View File

@@ -336,7 +336,7 @@ class Driver(BaseDriver):
return True
# certain types should not be quoted even though it contains a space.
# Evilness.
elif for_types and value[-2:] == "[]":
elif for_types and value.endswith('[]'):
val_noarray = value[:-2]
if for_types and val_noarray.lower() in [