Skip to content

Commit 91a058e

Browse files
Fix linting issues in parser.py by removing unused imports
1 parent 4428c0a commit 91a058e

File tree

1 file changed

+6
-18
lines changed
  • codegen-on-oss/codegen_on_oss/analyzers

1 file changed

+6
-18
lines changed

codegen-on-oss/codegen_on_oss/analyzers/parser.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,15 @@
88
in the system.
99
"""
1010

11+
import importlib.util
1112
import logging
1213
import sys
13-
from abc import ABC, abstractmethod
1414
from enum import Enum
15-
from pathlib import Path
16-
from typing import Any, Dict, Generic, List, Optional, Set, Tuple, TypeVar, Union, cast
17-
18-
try:
19-
from codegen.sdk.core.codebase import Codebase
20-
from codegen.sdk.core.node import Node
21-
from codegen.shared.enums.programming_language import ProgrammingLanguage
22-
23-
# Import from our own modules
24-
from codegen_on_oss.analyzers.issue_types import (
25-
AnalysisType,
26-
Issue,
27-
IssueCategory,
28-
IssueSeverity,
29-
)
30-
except ImportError:
31-
print("Codegen SDK or required modules not found.")
15+
from typing import Any, Optional, TypeVar
16+
17+
# Check if required modules are available
18+
if importlib.util.find_spec("codegen.sdk") is None:
19+
print("Codegen SDK not found.")
3220
sys.exit(1)
3321

3422
# Configure logging

0 commit comments

Comments
 (0)