mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-24 13:50:42 +00:00
chore(deps): update dependency ruff to v0.0.229 (#431)
This commit is contained in:
parent
9df909e8a1
commit
457e1fdcf9
@ -1,3 +1,3 @@
|
||||
"""Default package."""
|
||||
"""Provide version information."""
|
||||
|
||||
__version__ = "0.0.0"
|
||||
|
@ -12,7 +12,7 @@ from ansibledoctor.utils import SingleLog
|
||||
|
||||
|
||||
class AnsibleDoctor:
|
||||
"""Main doctor object."""
|
||||
"""Create main object."""
|
||||
|
||||
def __init__(self):
|
||||
self.log = SingleLog()
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
import fnmatch
|
||||
from collections import defaultdict
|
||||
from contextlib import suppress
|
||||
|
||||
import anyconfig
|
||||
import ruamel.yaml
|
||||
@ -38,13 +39,12 @@ class Parser:
|
||||
elif isinstance(d, list):
|
||||
for elem in d:
|
||||
self._yaml_remove_comments(elem)
|
||||
try:
|
||||
|
||||
with suppress(AttributeError):
|
||||
attr = "comment" if isinstance(
|
||||
d, ruamel.yaml.scalarstring.ScalarString
|
||||
) else ruamel.yaml.comments.Comment.attrib
|
||||
delattr(d, attr)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
def _parse_var_files(self):
|
||||
for rfile in self._files_registry.get_files():
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Custom exceptions."""
|
||||
"""Doctor exception module."""
|
||||
|
||||
|
||||
class DoctorError(Exception):
|
||||
"""Generic exception class for ansible-doctor."""
|
||||
"""Define generic exception."""
|
||||
|
||||
def __init__(self, msg, original_exception=""):
|
||||
super().__init__(f"{msg}\n{original_exception}")
|
||||
|
@ -56,7 +56,7 @@ class Singleton(type):
|
||||
|
||||
|
||||
class LogFilter:
|
||||
"""A custom log filter which excludes log messages above the logged level."""
|
||||
"""Exclude log messages above the logged level."""
|
||||
|
||||
def __init__(self, level):
|
||||
"""
|
||||
@ -74,7 +74,7 @@ class LogFilter:
|
||||
|
||||
|
||||
class MultilineFormatter(logging.Formatter):
|
||||
"""Logging Formatter to reset color after newline characters."""
|
||||
"""Reset color after newline characters."""
|
||||
|
||||
def format(self, record): # noqa
|
||||
record.msg = record.msg.replace("\n", f"\n{colorama.Style.RESET_ALL}... ")
|
||||
@ -82,7 +82,7 @@ class MultilineFormatter(logging.Formatter):
|
||||
|
||||
|
||||
class MultilineJsonFormatter(jsonlogger.JsonFormatter):
|
||||
"""Logging Formatter to remove newline characters."""
|
||||
"""Remove newline characters."""
|
||||
|
||||
def format(self, record): # noqa
|
||||
record.msg = record.msg.replace("\n", " ")
|
||||
|
36
poetry.lock
generated
36
poetry.lock
generated
@ -604,28 +604,28 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff"
|
||||
version = "0.0.227"
|
||||
version = "0.0.229"
|
||||
description = "An extremely fast Python linter, written in Rust."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
files = [
|
||||
{file = "ruff-0.0.227-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:2571a607e099e8fdd9d5aaf7450942a722b0de70215129c7240c3512dd73a2c7"},
|
||||
{file = "ruff-0.0.227-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:329a19f3fffbd4ac58f1e601c299f9970561b40c1c83bdd85c7233c04dd132b9"},
|
||||
{file = "ruff-0.0.227-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b2258a48901ac81cbefb971405c9baed7765fc6be3e4a939cdf4161a2e45e7f"},
|
||||
{file = "ruff-0.0.227-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cde152a5b29ed6ea33920d4a1e0bd57dd4ff854fcc4ec836e8d60fb42a5146ac"},
|
||||
{file = "ruff-0.0.227-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:091ce41b94e1c774dc6c89d10314fdba2f3646141ce9c7afea42f2943fc900da"},
|
||||
{file = "ruff-0.0.227-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:858869f6b1562472ded90c7de9d9cb9a1dac042200f2aba3d6fc42e92644a453"},
|
||||
{file = "ruff-0.0.227-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8494e55a7149b6ece0a63b7b3abb22babc0376580a2a03ee90b854961ed053b9"},
|
||||
{file = "ruff-0.0.227-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c22ac3899ce27e336a97520d978ce3a63d6a33f75c12fdd0aea0bb944fe279a"},
|
||||
{file = "ruff-0.0.227-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e117190dae6c3a7fe6386e8b6d18fe4e207c8abb3675f6b8d21a488ebc6018f"},
|
||||
{file = "ruff-0.0.227-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:2926a63c469da3a647195b3874a398fbcc1b703d8cea2e961747e5884b93c4b2"},
|
||||
{file = "ruff-0.0.227-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:79f9fe7d512e4fef9b448509cbdfe9ee67db17a0abd3f84c1e5d6efe8f544327"},
|
||||
{file = "ruff-0.0.227-py3-none-musllinux_1_2_i686.whl", hash = "sha256:956b9a806da5f8c1e5b54c933d6a1782a892849e401cfaa901d0e1f0a8542683"},
|
||||
{file = "ruff-0.0.227-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:f08ec3a4d9ecf70baee3922900d19098a56bf707410703411ea40e0e0db25fff"},
|
||||
{file = "ruff-0.0.227-py3-none-win32.whl", hash = "sha256:fbb2bb2a16041b192f10fee6ddab36f0ca847f0d33ca6a49128004ac1ba6d1ca"},
|
||||
{file = "ruff-0.0.227-py3-none-win_amd64.whl", hash = "sha256:59ee7ab9e610d43220ee12bc5f8845dddff0f857a48b08f630c87d337abcd5f0"},
|
||||
{file = "ruff-0.0.227.tar.gz", hash = "sha256:1da5eca99f4b35b8329391f0d5802b379c2672525a2526a2e0b64083e52adc03"},
|
||||
{file = "ruff-0.0.229-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:35635bfd375a50f67c5f7c6c3f7950e70c903ad784467fa464581d2ee5c8fcc1"},
|
||||
{file = "ruff-0.0.229-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:541822bf00016fd35415d35f4e8a03ebf94089525faac40a03ec00f6eebac2df"},
|
||||
{file = "ruff-0.0.229-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:52c0a7155843fa24fbdde06b98f8725da26dcd9a71ca334f4a15502ae5ea34b5"},
|
||||
{file = "ruff-0.0.229-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0ded94f1243ac39b8f89b1b6e80baa04b772628e01619ccf4a883d597debf9b2"},
|
||||
{file = "ruff-0.0.229-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ce98074164b3660260dc871804bfd8c22f8b5971063e6817d3e68178344624b"},
|
||||
{file = "ruff-0.0.229-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:a042de7a8da6a7f016ba9fe747697df21cf905179602a9282e52b99a2520c2bd"},
|
||||
{file = "ruff-0.0.229-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e39f78c0b115f9228297f25e653dcbdaa6c93ec3577c3b6839519c1b08012780"},
|
||||
{file = "ruff-0.0.229-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6910ac9bfc76e90d234ceed4b2b30a7955ae1783b696f4bf3476de583e0b5efa"},
|
||||
{file = "ruff-0.0.229-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eee7012303ed04a23210badba6a40da8372b8d5dd79d686831c3d1019dbe949f"},
|
||||
{file = "ruff-0.0.229-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:2fef23a28988275669838d23743a4ba281088d46ad53b6a6a72536b7b90fe3dd"},
|
||||
{file = "ruff-0.0.229-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:9b3eeedd031f3713e947c22206e0965f6770780774802aff77fd1862f0fdc261"},
|
||||
{file = "ruff-0.0.229-py3-none-musllinux_1_2_i686.whl", hash = "sha256:71d74a4da455bfa3162aaa6a6eb55028f301739b4f69b5cd16a6e5ea2c0c2544"},
|
||||
{file = "ruff-0.0.229-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1f3f95a2575d12a92b5a898fc54c6ec969497b167fec018a28a8f066fc1c9c1f"},
|
||||
{file = "ruff-0.0.229-py3-none-win32.whl", hash = "sha256:24c064bffc9b86408ded1e482fb99b06935d1b653959a3b152bd0402fc85775e"},
|
||||
{file = "ruff-0.0.229-py3-none-win_amd64.whl", hash = "sha256:9d72db5d2402fd59d50acb599e4fc3c3d9c68fb325f9af8c06e1adc73c29746d"},
|
||||
{file = "ruff-0.0.229.tar.gz", hash = "sha256:ad151359e5194f6e7a987bdefbab7da733bbcddbe99b8b77beca74b0e216b8bc"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -724,4 +724,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.7.0"
|
||||
content-hash = "0241a95e10f3b71e1a89aa9f98b11026801251e47b81ff43a37d429df0574865"
|
||||
content-hash = "ec3f72de06a0bb12c1057b40c586ce77648bd747bd15b2e8e9a5bc71156b6ded"
|
||||
|
@ -52,7 +52,7 @@ python-json-logger = "2.0.4"
|
||||
ansible-doctor = "ansibledoctor.cli:main"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
ruff = "0.0.227"
|
||||
ruff = "0.0.229"
|
||||
pytest = "7.2.1"
|
||||
pytest-mock = "3.10.0"
|
||||
pytest-cov = "4.0.0"
|
||||
|
Loading…
Reference in New Issue
Block a user