Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys committed Jun 28, 2023
1 parent 5411273 commit 90ba596
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 4 additions & 3 deletions ansibledoctor/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""Global settings definition."""

import os
from typing import ClassVar

import anyconfig
import environs
Expand All @@ -18,7 +19,7 @@
default_envs_prefix = "ANSIBLE_DOCTOR_"


class Config():
class Config:
"""
Create an object with all necessary settings.
Expand All @@ -28,7 +29,7 @@ class Config():
- provides cli parameters
"""

SETTINGS = {
SETTINGS: ClassVar[dict[dict]] = {
"config_file": {
"default": default_config_file,
"env": "CONFIG_FILE",
Expand Down Expand Up @@ -125,7 +126,7 @@ class Config():
},
}

ANNOTATIONS = {
ANNOTATIONS: ClassVar[dict[dict]] = {
"meta": {
"name": "meta",
"automatic": True,
Expand Down
4 changes: 0 additions & 4 deletions ansibledoctor/file_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
class Registry:
"""Register all yaml files."""

_doc = {}
log = None
config = None

def __init__(self):
self._doc = []
self.config = SingleConfig()
Expand Down
3 changes: 2 additions & 1 deletion ansibledoctor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys
from collections.abc import Iterable
from distutils.util import strtobool
from typing import ClassVar

import colorama
from pythonjsonlogger import jsonlogger
Expand Down Expand Up @@ -77,7 +78,7 @@ def _split_string(string, delimiter, escape, maxsplit=None):
class Singleton(type):
"""Meta singleton class."""

_instances = {}
_instances: ClassVar[dict] = {}

def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
Expand Down

0 comments on commit 90ba596

Please sign in to comment.