pylint: remove useless suppression

The newer version of pylint has fixed false positives and
does not need anymore these suppressions:
- global-variable-not-assigned
- invalid-sequence-index
- no-name-in-module
- not-callable
- unsupported-assignment-operation

Related: https://pagure.io/freeipa/issue/9278
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Stanislav Levin <slev@altlinux.org>
This commit is contained in:
Florence Blanc-Renaud
2022-11-18 16:45:25 +01:00
parent fd21204559
commit 51e0f751e9
7 changed files with 4 additions and 12 deletions

View File

@@ -132,7 +132,6 @@ def main():
print("Enabling plugin")
# https://github.com/PyCQA/pylint/issues/872
# pylint: disable=unsupported-assignment-operation
if entry is None:
ld = LDAPUpdate()
if not ld.update(files):
@@ -141,7 +140,6 @@ def main():
else:
entry['nsslapd-pluginenabled'] = ['on']
api.Backend.ldap2.update_entry(entry)
# pylint: enable=unsupported-assignment-operation
except errors.ExecutionError as lde:
print("An error occurred while talking to the server.")
print(lde)
@@ -171,9 +169,7 @@ def main():
else:
print("Disabling plugin")
# pylint: disable=unsupported-assignment-operation
entry['nsslapd-pluginenabled'] = ['off']
# pylint: enable=unsupported-assignment-operation
api.Backend.ldap2.update_entry(entry)
except errors.DatabaseError as dbe:
print("An error occurred while talking to the server.")

View File

@@ -155,9 +155,7 @@ def main():
elif entry.get('nsslapd-pluginenabled', [''])[0].lower() == 'off':
print("Enabling plugin")
# Already configured, just enable the plugin
# pylint: disable=unsupported-assignment-operation
entry['nsslapd-pluginenabled'] = ['on']
# pylint: enable=unsupported-assignment-operation
api.Backend.ldap2.update_entry(entry)
else:
print("Plugin already Enabled")