Skip to content

Lint cleanup #32

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

Closed
wants to merge 4 commits into from
Closed
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
3 changes: 1 addition & 2 deletions api/analyzers/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ def second_pass(self, path: Path, f: io.TextIOWrapper) -> None:
f (io.TextIOWrapper): The file handle of the file to be processed.
"""

pass

pass
12 changes: 6 additions & 6 deletions api/analyzers/c/analyzer.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import io
import os
from ..utils import *
from pathlib import Path
import logging
import tree_sitter_c as tsc
from tree_sitter import Language, Parser, Node
from typing import Optional

from ..utils import *
from ...entities import *
from ...graph import Graph
from typing import Union, Optional
from ..analyzer import AbstractAnalyzer

import tree_sitter_c as tsc
from tree_sitter import Language, Parser, Node

C_LANGUAGE = Language(tsc.language())

import logging
logger = logging.getLogger('code_graph')

class CAnalyzer(AbstractAnalyzer):
Expand Down
6 changes: 3 additions & 3 deletions api/analyzers/python/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ def first_pass(self, path: Path, f: io.TextIOWrapper, graph:Graph) -> None:
"""

if path.suffix != '.py':
logger.debug(f"Skipping none Python file {path}")
logger.debug("Skipping none Python file %s", path)
return

logger.info(f"Python Processing {path}")
logger.info("Python Processing %s", path)

# Create file entity
file = File(os.path.dirname(path), path.name, path.suffix)
Expand Down Expand Up @@ -281,7 +281,7 @@ def process_function_call(self, node) -> Optional[str]:
logger.warning("Unknown function call pattern")
return None

logger.debug(f"callee_name: {callee_name}")
logger.debug("callee_name: %s", callee_name)
return callee_name

def process_call_node(self, caller: Union[Function, File], callee_name: str,
Expand Down
1 change: 1 addition & 0 deletions api/entities/struct.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Optional
from typing import List

class Struct():
"""
Expand Down
2 changes: 2 additions & 0 deletions tests/source_files/py/src.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Task
Copy link
Preview

Copilot AI Nov 28, 2024

Choose a reason for hiding this comment

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

The import statement for 'Task' from the 'typing' module is unnecessary as 'Task' is not used in the code.

Copilot uses AI. Check for mistakes.


def log(msg: str) -> None:
print(f'msg: {msg}')

Expand Down
Loading