Skip to content

style: deal with B024 added to flake8 recently #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skywalking/agent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from skywalking.trace.context import Segment

__started = False
__protocol = Protocol() # type: Protocol
__protocol = None # type: Protocol
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incompatible variable type: __protocol is declared to have type Protocol but is used as type None.


Reply with "@sonatype-lift help" for info about LiftBot commands.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.

When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

__heartbeat_thread = __report_thread = __log_report_thread = __query_profile_thread = __command_dispatch_thread \
= __send_profile_thread = __queue = __log_queue = __snapshot_queue = __finished = None

Expand Down
5 changes: 4 additions & 1 deletion skywalking/agent/protocol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

from abc import ABC
from abc import ABC, abstractmethod
from queue import Queue


Expand All @@ -29,12 +29,15 @@ def fork_after_in_parent(self):
def fork_after_in_child(self):
pass

@abstractmethod
def heartbeat(self):
raise NotImplementedError()

@abstractmethod
def report(self, queue: Queue, block: bool = True):
raise NotImplementedError()

@abstractmethod
def report_log(self, queue: Queue, block: bool = True):
raise NotImplementedError()

Expand Down
3 changes: 1 addition & 2 deletions skywalking/trace/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#

import time
from abc import ABC
from collections import defaultdict
from typing import List, Union, DefaultDict
from typing import TYPE_CHECKING
Expand All @@ -33,7 +32,7 @@


@tostring
class Span(ABC):
class Span:
def __init__(
self,
context: 'SpanContext',
Expand Down
3 changes: 1 addition & 2 deletions tests/plugin/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import inspect
import os
import sys
from abc import ABC
from difflib import Differ
from os.path import dirname

Expand All @@ -32,7 +31,7 @@
from yaml import SafeLoader as Loader


class TestPluginBase(ABC):
class TestPluginBase:
def validate(self, expected_file_name=None):
# type: (str) -> Response

Expand Down