Skip to content

Commit 67c9158

Browse files
Copilotgkorland
andcommitted
Address code review feedback: remove unused imports and simplify path construction
Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
1 parent 386209e commit 67c9158

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

api/analyzers/kotlin/analyzer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import os
21
from pathlib import Path
3-
import subprocess
42
from ...entities import *
53
from typing import Optional
64
from ..analyzer import AbstractAnalyzer

tests/test_kotlin_analyzer.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
1-
import os
21
import unittest
32
from pathlib import Path
43

54
from api import SourceAnalyzer, Graph
65

76
class Test_Kotlin_Analyzer(unittest.TestCase):
87
def test_analyzer(self):
9-
path = Path(__file__).parent
108
analyzer = SourceAnalyzer()
119

12-
# Get the current file path
13-
current_file_path = os.path.abspath(__file__)
14-
15-
# Get the directory of the current file
16-
current_dir = os.path.dirname(current_file_path)
17-
18-
# Append 'source_files/kotlin' to the current directory
19-
path = os.path.join(current_dir, 'source_files')
20-
path = os.path.join(path, 'kotlin')
21-
path = str(path)
10+
# Get the path to the test Kotlin source files
11+
path = str(Path(__file__).parent / 'source_files' / 'kotlin')
2212

2313
g = Graph("kotlin")
2414
analyzer.analyze_local_folder(path, g)

0 commit comments

Comments
 (0)