From 53daddc5747757d1444397aa12dd7c6982410ecc Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 6 Feb 2024 10:07:04 +0100 Subject: [PATCH] Make the linter happy --- bin/barracuda-sync | 36 ++++++++++++++++++++---------------- bin/check-ldap-dn-attributes | 36 ++++++++++++++++++++---------------- bin/dns-deploy-zones | 36 ++++++++++++++++++++---------------- 3 files changed, 60 insertions(+), 48 deletions(-) diff --git a/bin/barracuda-sync b/bin/barracuda-sync index 7812d01..7bdf080 100755 --- a/bin/barracuda-sync +++ b/bin/barracuda-sync @@ -1,36 +1,40 @@ #!/usr/bin/env python3 +""" +@summary: An application module for the barracuda-sync application object. +@author: Frank Brehm +@contact: frank.brehm@pixelpark.com +@copyright: © 2023 by Frank Brehm, Berlin +""" from __future__ import print_function # Standard modules +import locale +import os import sys +try: + from pathlib import Path +except ImportError: + from pathlib2 import Path + __exp_py_version_major__ = 3 __min_py_version_minor__ = 6 if sys.version_info[0] != __exp_py_version_major__: - print("This script is intended to use with Python {}.".format( + print('This script is intended to use with Python {}.'.format( __exp_py_version_major__), file=sys.stderr) - print("You are using Python: {0}.{1}.{2}-{3}-{4}.".format( - *sys.version_info) + "\n", file=sys.stderr) + print('You are using Python: {0}.{1}.{2}-{3}-{4}.'.format( + *sys.version_info) + '\n', file=sys.stderr) sys.exit(1) if sys.version_info[1] < __min_py_version_minor__: - print("A minimal Python version of {maj}.{min} is necessary to execute this script.".format( + print('A minimal Python version of {maj}.{min} is necessary to execute this script.'.format( maj=__exp_py_version_major__, min=__min_py_version_minor__), file=sys.stderr) - print("You are using Python: {0}.{1}.{2}-{3}-{4}.".format( - *sys.version_info) + "\n", file=sys.stderr) + print('You are using Python: {0}.{1}.{2}-{3}-{4}.'.format( + *sys.version_info) + '\n', file=sys.stderr) sys.exit(1) -# Standard modules -import os -import locale - -try: - from pathlib import Path -except ImportError: - from pathlib2 import Path - __author__ = 'Frank Brehm ' __copyright__ = '(C) 2023 by Frank Brehm, Digitas Pixelpark GmbH, Berlin' @@ -56,7 +60,7 @@ app = BarracudaSyncApp(appname=appname, base_dir=base_dir) app.initialized = True if app.verbose > 2: - print("{c}-Object:\n{a}".format(c=app.__class__.__name__, a=app)) + print('{c}-Object:\n{a}'.format(c=app.__class__.__name__, a=app)) app() diff --git a/bin/check-ldap-dn-attributes b/bin/check-ldap-dn-attributes index b1eb222..e6eedca 100755 --- a/bin/check-ldap-dn-attributes +++ b/bin/check-ldap-dn-attributes @@ -1,36 +1,40 @@ #!/usr/bin/env python3 +""" +@summary: An application module for checking all DN-like attributes in a LDAP instance. +@author: Frank Brehm +@contact: frank.brehm@pixelpark.com +@copyright: © 2023 by Frank Brehm, Berlin +""" from __future__ import print_function # Standard modules +import locale +import os import sys +try: + from pathlib import Path +except ImportError: + from pathlib2 import Path + __exp_py_version_major__ = 3 __min_py_version_minor__ = 6 if sys.version_info[0] != __exp_py_version_major__: - print("This script is intended to use with Python {}.".format( + print('This script is intended to use with Python {}.'.format( __exp_py_version_major__), file=sys.stderr) - print("You are using Python: {0}.{1}.{2}-{3}-{4}.".format( - *sys.version_info) + "\n", file=sys.stderr) + print('You are using Python: {0}.{1}.{2}-{3}-{4}.'.format( + *sys.version_info) + '\n', file=sys.stderr) sys.exit(1) if sys.version_info[1] < __min_py_version_minor__: - print("A minimal Python version of {maj}.{min} is necessary to execute this script.".format( + print('A minimal Python version of {maj}.{min} is necessary to execute this script.'.format( maj=__exp_py_version_major__, min=__min_py_version_minor__), file=sys.stderr) - print("You are using Python: {0}.{1}.{2}-{3}-{4}.".format( - *sys.version_info) + "\n", file=sys.stderr) + print('You are using Python: {0}.{1}.{2}-{3}-{4}.'.format( + *sys.version_info) + '\n', file=sys.stderr) sys.exit(1) -# Standard modules -import os -import locale - -try: - from pathlib import Path -except ImportError: - from pathlib2 import Path - __author__ = 'Frank Brehm ' __copyright__ = '(C) 2023 by Frank Brehm, Digitas Pixelpark GmbH, Berlin' @@ -56,7 +60,7 @@ app = CheckLdapDnAttributesApplication(appname=appname, base_dir=base_dir) app.initialized = True if app.verbose > 2: - print("{c}-Object:\n{a}".format(c=app.__class__.__name__, a=app)) + print('{c}-Object:\n{a}'.format(c=app.__class__.__name__, a=app)) app() diff --git a/bin/dns-deploy-zones b/bin/dns-deploy-zones index 98fc0d5..6ba3145 100755 --- a/bin/dns-deploy-zones +++ b/bin/dns-deploy-zones @@ -1,36 +1,40 @@ #!/usr/bin/env python3 +""" +@summary: A module for the application class for configuring named. +@author: Frank Brehm +@contact: frank.brehm@pixelpark.com +@copyright: © 2023 by Frank Brehm, Berlin +""" from __future__ import print_function # Standard modules +import locale +import os import sys +try: + from pathlib import Path +except ImportError: + from pathlib2 import Path + __exp_py_version_major__ = 3 __min_py_version_minor__ = 6 if sys.version_info[0] != __exp_py_version_major__: - print("This script is intended to use with Python {}.".format( + print('This script is intended to use with Python {}.'.format( __exp_py_version_major__), file=sys.stderr) - print("You are using Python: {0}.{1}.{2}-{3}-{4}.".format( - *sys.version_info) + "\n", file=sys.stderr) + print('You are using Python: {0}.{1}.{2}-{3}-{4}.'.format( + *sys.version_info) + '\n', file=sys.stderr) sys.exit(1) if sys.version_info[1] < __min_py_version_minor__: - print("A minimal Python version of {maj}.{min} is necessary to execute this script.".format( + print('A minimal Python version of {maj}.{min} is necessary to execute this script.'.format( maj=__exp_py_version_major__, min=__min_py_version_minor__), file=sys.stderr) - print("You are using Python: {0}.{1}.{2}-{3}-{4}.".format( - *sys.version_info) + "\n", file=sys.stderr) + print('You are using Python: {0}.{1}.{2}-{3}-{4}.'.format( + *sys.version_info) + '\n', file=sys.stderr) sys.exit(1) -# Standard modules -import os -import locale - -try: - from pathlib import Path -except ImportError: - from pathlib2 import Path - # own modules: my_path = Path(__file__) @@ -56,7 +60,7 @@ app = PpDeployZonesApp(appname=appname, base_dir=base_dir) app.initialized = True if app.verbose > 2: - print("{c}-Object:\n{a}".format(c=app.__class__.__name__, a=app)) + print('{c}-Object:\n{a}'.format(c=app.__class__.__name__, a=app)) app() -- 2.39.5