Skip to content

Commit 4b68316

Browse files
committed
version bump
1 parent 1798650 commit 4b68316

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

src/core/__init__.py

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,13 @@
77
log = logging.getLogger("socket-external-tool")
88
log.addHandler(logging.NullHandler())
99

10-
__all__ = [
11-
"marker",
12-
"__version__",
13-
"__author__",
14-
"log",
15-
"base_github"
16-
]
17-
18-
__version__ = "1.0.15"
10+
__all__ = ["marker", "__version__", "__author__", "log", "base_github"]
11+
12+
__version__ = "1.0.16"
1913
__author__ = "socket.dev"
2014
base_github = "https://github.com"
2115

22-
marker = f"<!--Socket External Tool Runner: REPLACE_ME -->"
16+
marker = "<!--Socket External Tool Runner: REPLACE_ME -->"
2317

2418

2519
class BaseTool:
@@ -29,12 +23,7 @@ class BaseTool:
2923
@classmethod
3024
def process_output(cls, data: dict, cwd: str, plugin_name: str = "") -> dict:
3125
results = data.get(cls.result_key, [])
32-
metrics = {
33-
"tests": {},
34-
"severities": {},
35-
"output": [],
36-
"events": []
37-
}
26+
metrics = {"tests": {}, "severities": {}, "output": [], "events": []}
3827

3928
for test in results:
4029
test_result = cls.result_class(**test, cwd=cwd)
@@ -67,8 +56,9 @@ def get_test_name(test_result):
6756
return "test_result"
6857

6958
@classmethod
70-
def create_output(cls, data: dict, marker: str, repo: str, commit: str, cwd: str, show_unverified=None) -> (
71-
Union[str, None], dict):
59+
def create_output(
60+
cls, data: dict, marker: str, repo: str, commit: str, cwd: str, show_unverified=None
61+
) -> (Union[str, None], dict):
7262
"""Formats output as properly structured Markdown."""
7363

7464
# Determine if the connector supports the show_verified argument
@@ -93,7 +83,8 @@ def create_output(cls, data: dict, marker: str, repo: str, commit: str, cwd: str
9383
for output in result["output"]:
9484
file_link = (
9585
f"[{output.file}]({output.url.replace('REPO_REPLACE', repo).replace('COMMIT_REPLACE', commit)})"
96-
if hasattr(output, "url") else f"`{output.file}`"
86+
if hasattr(output, "url")
87+
else f"`{output.file}`"
9788
)
9889
has_first_line = output.__dict__.get("has_first_line", False)
9990
if has_first_line and not set_first_line:
@@ -105,7 +96,7 @@ def create_output(cls, data: dict, marker: str, repo: str, commit: str, cwd: str
10596
md.new_line(f"**Severity**: `{output.__dict__.get('severity', 'N/A')}`")
10697
md.new_line(f"**Filename:** {file_link}")
10798
else:
108-
source = output.__dict__.get('issue_text', '').replace('REPLACE_FILE_LINK', file_link)
99+
source = output.__dict__.get("issue_text", "").replace("REPLACE_FILE_LINK", file_link)
109100
issue_text = f"{source.replace('REPO_REPLACE', repo).replace('COMMIT_REPLACE', commit)}"
110101
md.new_line(issue_text)
111102

@@ -120,4 +111,3 @@ def create_output(cls, data: dict, marker: str, repo: str, commit: str, cwd: str
120111
output_str = md.file_data_text.lstrip()
121112

122113
return result, output_str
123-

0 commit comments

Comments
 (0)