Adding evaluation of Ruff
This commit is contained in:
parent
79eb6bba62
commit
be0d8493ac
|
|
@ -6,7 +6,6 @@ from .lib.disk import *
|
||||||
from .lib.exceptions import *
|
from .lib.exceptions import *
|
||||||
from .lib.general import *
|
from .lib.general import *
|
||||||
from .lib.hardware import *
|
from .lib.hardware import *
|
||||||
from .lib.installer import __packages__, Installer, accessibility_tools_in_use
|
|
||||||
from .lib.locale_helpers import *
|
from .lib.locale_helpers import *
|
||||||
from .lib.luks import *
|
from .lib.luks import *
|
||||||
from .lib.mirrors import *
|
from .lib.mirrors import *
|
||||||
|
|
@ -14,37 +13,14 @@ from .lib.models.network_configuration import NetworkConfigurationHandler
|
||||||
from .lib.models.users import User
|
from .lib.models.users import User
|
||||||
from .lib.networking import *
|
from .lib.networking import *
|
||||||
from .lib.output import *
|
from .lib.output import *
|
||||||
from .lib.models.dataclasses import (
|
|
||||||
VersionDef,
|
|
||||||
PackageSearchResult,
|
|
||||||
PackageSearch,
|
|
||||||
LocalPackage
|
|
||||||
)
|
|
||||||
from .lib.packages.packages import (
|
|
||||||
group_search,
|
|
||||||
package_search,
|
|
||||||
find_package,
|
|
||||||
find_packages,
|
|
||||||
installed_package,
|
|
||||||
validate_package_list,
|
|
||||||
)
|
|
||||||
from .lib.profiles import *
|
from .lib.profiles import *
|
||||||
from .lib.services import *
|
from .lib.services import *
|
||||||
from .lib.storage import *
|
from .lib.storage import *
|
||||||
from .lib.systemd import *
|
from .lib.systemd import *
|
||||||
from .lib.user_interaction import *
|
from .lib.user_interaction import *
|
||||||
from .lib.menu import Menu
|
|
||||||
from .lib.menu.list_manager import ListManager
|
|
||||||
from .lib.menu.text_input import TextInput
|
|
||||||
from .lib.menu.global_menu import GlobalMenu
|
|
||||||
from .lib.menu.abstract_menu import (
|
|
||||||
Selector,
|
|
||||||
AbstractMenu
|
|
||||||
)
|
|
||||||
from .lib.translationhandler import TranslationHandler, DeferredTranslation
|
from .lib.translationhandler import TranslationHandler, DeferredTranslation
|
||||||
from .lib.plugins import plugins, load_plugin # This initiates the plugin loading ceremony
|
from .lib.plugins import plugins, load_plugin # This initiates the plugin loading ceremony
|
||||||
from .lib.configuration import *
|
from .lib.configuration import *
|
||||||
from .lib.udev import udevadm_info
|
|
||||||
parser = ArgumentParser()
|
parser = ArgumentParser()
|
||||||
|
|
||||||
__version__ = "2.5.3"
|
__version__ = "2.5.3"
|
||||||
|
|
@ -194,7 +170,6 @@ def load_config():
|
||||||
"""
|
"""
|
||||||
refine and set some arguments. Formerly at the scripts
|
refine and set some arguments. Formerly at the scripts
|
||||||
"""
|
"""
|
||||||
from .lib.models import NetworkConfiguration
|
|
||||||
|
|
||||||
if (archinstall_lang := arguments.get('archinstall-language', None)) is not None:
|
if (archinstall_lang := arguments.get('archinstall-language', None)) is not None:
|
||||||
arguments['archinstall-language'] = TranslationHandler().get_language_by_name(archinstall_lang)
|
arguments['archinstall-language'] = TranslationHandler().get_language_by_name(archinstall_lang)
|
||||||
|
|
|
||||||
|
|
@ -41,3 +41,38 @@ exclude = "tests"
|
||||||
[tool.bandit]
|
[tool.bandit]
|
||||||
targets = ["archinstall"]
|
targets = ["archinstall"]
|
||||||
exclude = ["/tests"]
|
exclude = ["/tests"]
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
|
||||||
|
select = ["E", "F"]
|
||||||
|
ignore = []
|
||||||
|
|
||||||
|
# Allow autofix for all enabled rules (when `--fix`) is provided.
|
||||||
|
fixable = ["A", "B", "C", "D", "E", "F"]
|
||||||
|
unfixable = []
|
||||||
|
|
||||||
|
# Exclude a variety of commonly ignored directories.
|
||||||
|
exclude = [
|
||||||
|
".eggs",
|
||||||
|
".git",
|
||||||
|
".mypy_cache",
|
||||||
|
".ruff_cache",
|
||||||
|
".venv",
|
||||||
|
"__pypackages__",
|
||||||
|
"build",
|
||||||
|
"dist",
|
||||||
|
"venv",
|
||||||
|
]
|
||||||
|
|
||||||
|
# Same as Black.
|
||||||
|
line-length = 255
|
||||||
|
|
||||||
|
# Allow unused variables when underscore-prefixed.
|
||||||
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||||
|
|
||||||
|
# Assume Python 3.10.
|
||||||
|
target-version = "py310"
|
||||||
|
|
||||||
|
[tool.ruff.mccabe]
|
||||||
|
# Unlike Flake8, default to a complexity level of 10.
|
||||||
|
max-complexity = 10
|
||||||
Loading…
Reference in New Issue