Skip to content

Commit 1d1782d

Browse files
wu-shengclaude
andcommitted
fix: resolve flake8 E305/E402 lint errors in plugin loader
Move imports to top of file and ensure 2 blank lines after function definition to satisfy flake8 rules. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ebb6781 commit 1d1782d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

skywalking/plugins/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
import re
2323
import traceback
2424

25-
PackageNotFoundException = importlib.metadata.PackageNotFoundError
26-
27-
28-
def get_pkg_version(pkg_name):
29-
return importlib.metadata.version(pkg_name)
30-
3125
from packaging import version
3226

3327
import skywalking
@@ -36,6 +30,12 @@ def get_pkg_version(pkg_name):
3630
from skywalking.utils.comparator import operators
3731
from skywalking.utils.exception import VersionRuleException
3832

33+
PackageNotFoundException = importlib.metadata.PackageNotFoundError
34+
35+
36+
def get_pkg_version(pkg_name):
37+
return importlib.metadata.version(pkg_name)
38+
3939

4040
def install():
4141
disable_patterns = config.agent_disable_plugins

0 commit comments

Comments
 (0)