Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
- Sort imports
  • Loading branch information
argysamo committed Oct 22, 2023
1 parent 80c57ad commit fda1fc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions prometheus_aioexporter/script.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
"""Run a web server providing a Prometheus metrics endpoint."""

import argparse
from collections.abc import Iterable
import logging
import ssl
import sys
from collections.abc import Iterable
from ssl import SSLContext
from typing import (
IO,
)
import sys
from typing import IO

from aiohttp.web import Application
from prometheus_client import (
Expand Down Expand Up @@ -40,7 +38,8 @@ class PrometheusExporterScript(Script): # type: ignore
registry: MetricsRegistry

def __init__(
self, stdout: IO[bytes] | None = None, stderr: IO[bytes] | None = None
self, stdout: IO[bytes] | None = None,
stderr: IO[bytes] | None = None
) -> None:
super().__init__(stdout=stdout, stderr=stderr)
self.registry = MetricsRegistry()
Expand All @@ -60,7 +59,7 @@ def logger(self) -> logging.Logger:
return logging.getLogger(name=self.name)

def configure_argument_parser(
self, parser: argparse.ArgumentParser
self, parser: argparse.ArgumentParser
) -> None:
"""Add configuration to the ArgumentParser.
Expand Down Expand Up @@ -97,7 +96,7 @@ def configure(self, args: argparse.Namespace) -> None:
"""

def create_metrics(
self, metric_configs: Iterable[MetricConfig]
self, metric_configs: Iterable[MetricConfig]
) -> dict[str, Metric]:
"""Create and register metrics from a list of MetricConfigs."""
return self.registry.create_metrics(metric_configs)
Expand Down
2 changes: 1 addition & 1 deletion tests/script_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from io import StringIO
import logging
from ssl import SSLContext
from unittest import mock

Expand Down

0 comments on commit fda1fc6

Please sign in to comment.