mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-07-22 02:03:01 +02:00
Stop using Ruff "preview" rules, as CI has an older version of Ruff.
This commit is contained in:
@@ -325,7 +325,7 @@ def make_argument_description(schema, flag_name):
|
||||
' To specify a different list element, replace the "[0]" with another array index ("[1]", "[2]", etc.).',
|
||||
)
|
||||
|
||||
if example and schema_type in ('array', 'object'): # noqa: PLR6201
|
||||
if example and schema_type in ('array', 'object'):
|
||||
example_buffer = io.StringIO()
|
||||
yaml = ruamel.yaml.YAML(typ='safe')
|
||||
yaml.default_flow_style = True
|
||||
@@ -2128,7 +2128,7 @@ def parse_arguments(schema, *unparsed_arguments):
|
||||
)
|
||||
|
||||
if (
|
||||
('list' in arguments and 'repo-info' in arguments and arguments['list'].json) # noqa: PLR0916
|
||||
('list' in arguments and 'repo-info' in arguments and arguments['list'].json)
|
||||
or ('list' in arguments and 'info' in arguments and arguments['list'].json)
|
||||
or ('repo-info' in arguments and 'info' in arguments and arguments['repo-info'].json)
|
||||
):
|
||||
@@ -2146,7 +2146,7 @@ def parse_arguments(schema, *unparsed_arguments):
|
||||
'With the repo-list action, only one of --prefix or --match-archives flags can be used.',
|
||||
)
|
||||
|
||||
if 'info' in arguments and ( # noqa: PLR0916
|
||||
if 'info' in arguments and (
|
||||
(arguments['info'].archive and arguments['info'].prefix)
|
||||
or (arguments['info'].archive and arguments['info'].match_archives)
|
||||
or (arguments['info'].prefix and arguments['info'].match_archives)
|
||||
|
||||
@@ -212,7 +212,7 @@ def run_configuration(config_filename, config, config_paths, arguments): # noqa
|
||||
f"Skipping {'/'.join(skip_actions)} action{'s' if len(skip_actions) > 1 else ''} due to configured skip_actions",
|
||||
)
|
||||
|
||||
try: # noqa: PLR1702
|
||||
try:
|
||||
with (
|
||||
Monitoring_hooks(config_filename, config, arguments, global_arguments),
|
||||
borgmatic.hooks.command.Before_after_hooks(
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@ class Json_formatter(logging.Formatter):
|
||||
def __init__(self, fmt='{message}', *args, style='{', **kwargs):
|
||||
super().__init__(*args, fmt=fmt, style=style, **kwargs)
|
||||
|
||||
def format(self, record): # noqa: PLR6301
|
||||
def format(self, record):
|
||||
return log_record_to_json(record)
|
||||
|
||||
|
||||
|
||||
+1
-4
@@ -57,7 +57,7 @@ exclude = ["*.*/*"]
|
||||
quote-style = "preserve"
|
||||
|
||||
[tool.ruff.lint]
|
||||
preview = true
|
||||
preview = false
|
||||
extend-select = [
|
||||
"A", # flake8-builtins: builtin shadowing
|
||||
"B", # flake8-bugbear: bugs and design problems
|
||||
@@ -134,8 +134,5 @@ known-first-party = ["borgmatic"]
|
||||
"T201", # print statement
|
||||
]
|
||||
|
||||
[tool.ruff.lint.pylint]
|
||||
max-statements-in-try = 35
|
||||
|
||||
[tool.codespell]
|
||||
skip = ".git,.tox,build"
|
||||
|
||||
Reference in New Issue
Block a user