Skip to content

Commit

Permalink
Fix W0611 and R0903 for log streaming (#7483)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiec-msft committed Apr 10, 2024
1 parent 550dfe6 commit 1a1942e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
logger = get_logger(__name__)


class LogStreamBaseQueryOptions:
class LogStreamBaseQueryOptions: # pylint: disable=too-few-public-methods
def __init__(self, follow, lines, since, limit):
self.follow = follow
self.lines = lines
Expand Down
5 changes: 2 additions & 3 deletions src/spring/azext_spring/log_stream/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
import sys


class DefaultWriter:
class DefaultWriter: # pylint: disable=too-few-public-methods
def write(self, data, end='', file=None):
print(data, end=end, file=file)


class PrefixWriter(DefaultWriter):
class PrefixWriter(DefaultWriter): # pylint: disable=too-few-public-methods
def __init__(self, prefix):
self.prefix = prefix

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
SCG_OPERATOR = "spring-cloud-gateway-operator"


class ManagedComponentInstance:
class ManagedComponentInstance: # pylint: disable=too-few-public-methods
def __init__(self, name):
self.name = name

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from azure.cli.core._profile import Profile
from azure.cli.core.commands.client_factory import get_subscription_id
from knack.log import get_logger
from knack.util import CLIError
from threading import Thread
from time import sleep

from .managed_component import (Acs, Flux, Scg, ScgOperator,
ManagedComponentInstance, supported_components, get_component)
from .managed_component import (ManagedComponentInstance, supported_components)

from ..log_stream.writer import (DefaultWriter, PrefixWriter)
from ..log_stream.log_stream_operations import (attach_logs_query_options, log_stream_from_url,
Expand All @@ -22,7 +18,7 @@
logger = get_logger(__name__)


class ManagedComponentInstanceInfo:
class ManagedComponentInstanceInfo: # pylint: disable=too-few-public-methods
component: str
instance: str

Expand Down

0 comments on commit 1a1942e

Please sign in to comment.