Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
tcamise-gpsw committed Dec 7, 2023
1 parent f35dd1f commit a4d8585
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@

"""Manage a Bluetooth connection using bleak."""

import sys
import tempfile
import asyncio
import logging
import platform
import tempfile
from pathlib import Path
from typing import Any, Callable, Optional, Pattern

Expand Down
8 changes: 4 additions & 4 deletions demos/python/sdk_wireless_camera_control/open_gopro/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(
)
self.file_handler.setFormatter(file_formatter)
# Set to TRACE for concurrency debugging
self.file_handler.setLevel(logging.DEBUG) # type: ignore # pylint: disable=no-member
self.file_handler.setLevel(logging.DEBUG)
logger.addHandler(self.file_handler)
self.addLoggingHandler(self.file_handler)
else:
Expand Down Expand Up @@ -124,7 +124,7 @@ def addLoggingHandler(self, handler: logging.Handler) -> None:
# Enable / disable logging in modules
for module in self.modules:
l = logging.getLogger(module)
l.setLevel(logging.TRACE) # type: ignore
l.setLevel(logging.TRACE) # type: ignore
l.addHandler(handler)

# From https://stackoverflow.com/questions/2183233/how-to-add-a-custom-loglevel-to-pythons-logging-facility/35804945#35804945
Expand Down Expand Up @@ -259,10 +259,10 @@ def set_logging_level(level: int) -> None:
set_stream_logging_level(level)


def add_logging_handler(handler: logging.Handler, level: int) -> None:
def add_logging_handler(handler: logging.Handler) -> None:
"""Add a handler to all of the GoPro internal modules
Args:
handler (logging.Handler): handler to add
"""
Logger.get_instance().addLoggingHandler(handler, level)
Logger.get_instance().addLoggingHandler(handler)

0 comments on commit a4d8585

Please sign in to comment.