Skip to content

Commit

Permalink
mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andgineer committed Sep 9, 2021
1 parent 7de5ecb commit c4331b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bombard/bombardier.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Bombardier(WeaverMill):

def __init__(
self,
args: object,
args: Any,
supply: Optional[Dict[str, Any]] = None,
campaign_book: Optional[Dict[str, Any]] = None,
ok_statuses: Optional[Set[int]] = None,
Expand Down
12 changes: 7 additions & 5 deletions bombard/request_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
"""
import logging
import threading
from typing import Optional
from typing import Any, Callable, Optional

from bombard.pretty_ns import pretty_ns as plain_ns
from bombard.pretty_ns import time_ns
from bombard.terminal_colours import GRAY, OFF

log = logging.getLogger()
thread_data = threading.local()
pretty_ns = plain_ns # we can redefine that to have customized formatting
pretty_ns: Callable[
[int, Optional[Any]], str
] = plain_ns # we can redefine that to have customized formatting


def main_thread():
def main_thread() -> None:
"""
We are in main thread
"""
Expand All @@ -28,7 +30,7 @@ def main_thread():
thread_data.colour = OFF


def sending(thread_id, request_id, request_name):
def sending(thread_id, request_id, request_name) -> None:
"""
Start sending request
"""
Expand All @@ -40,7 +42,7 @@ def sending(thread_id, request_id, request_name):
thread_data.start = time_ns()


def receiving():
def receiving() -> None:
"""
Got response to request
"""
Expand Down

0 comments on commit c4331b6

Please sign in to comment.