fix linting

This commit is contained in:
Robert Kaussow 2023-06-28 08:19:11 +02:00
parent 1c801db6ae
commit de0450b130
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 6 additions and 4 deletions

View File

@ -3,6 +3,7 @@
import os
from pathlib import Path, PurePath
from typing import ClassVar
import anyconfig
import environs
@ -20,7 +21,7 @@ cache_dir = AppDirs("prometheus-pve-sd").user_cache_dir
default_output_file = os.path.join(cache_dir, "pve.json")
class Config():
class Config:
"""
Create an object with all necessary settings.
@ -30,7 +31,7 @@ class Config():
- provides cli parameters
"""
SETTINGS = {
SETTINGS: ClassVar[dict[dict]] = {
"metrics.enabled": {
"default": True,
"env": "METRICS_ENABLED",

View File

@ -20,7 +20,7 @@ PROPAGATION_TIME = Summary(
HOST_GAUGE = Gauge("pve_sd_hosts", "Number of hosts discovered by PVE SD")
class Discovery():
class Discovery:
"""Prometheus PVE Service Discovery."""
def __init__(self):

View File

@ -2,6 +2,7 @@
"""Global utility methods and classes."""
from distutils.util import strtobool
from typing import ClassVar
def to_bool(string):
@ -11,7 +12,7 @@ def to_bool(string):
class Singleton(type):
"""Meta singleton class."""
_instances = {}
_instances: ClassVar[dict] = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances: