Skip to content

Commit a9bf54e

Browse files
committed
fixes to allow proper project building
1 parent 53289f2 commit a9bf54e

10 files changed

Lines changed: 15 additions & 3 deletions

File tree

cli/translations/en.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@
3131
"private_methods_count_option": "Private Methods Count",
3232
"public_methods_count_option": "Public Methods Count",
3333
"comment_ratio_option": "Comment to Code Ratio",
34-
}
34+
}
35+

lexers/golang/golexer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import re
22
from ..token import Token, TokenType
33

4+
45
class GoLexer:
56
# palavras-chave do Go
67
KEYWORDS = {

lexers/javascript/javascriptlexer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import re
22
from ..token import Token, TokenType
33

4+
45
class JavaScriptLexer:
56
# palavras-chave do javascript
67
KEYWORDS = {

lexers/python/pythonlexer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class PythonLexer:
1010
"global", "nonlocal", "assert", "del", "async", "await"
1111
}
1212

13+
1314
# operadores do python
1415
OPERATORS = {
1516
"+", "-", "*", "/", "//", "%", "**", "=", "==", "!=", "<", ">", "<=", ">=",

lexers/token.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class TokenType(Enum):
1111
SYMBOL = auto()
1212
DELIMITER = auto()
1313

14+
1415
# special token types
1516
NEWLINE = auto()
1617
COMMENT = auto()

parser/ast.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class Node:
44
"""Base class for all AST nodes."""
55
pass
66

7+
78
class Program(Node):
89
"""Root node representing the entire program."""
910
def __init__(self, statements):

spice/analyze.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def analyze_file(file_path: str, selected_stats: Optional[List[str]] = None) ->
1313
Valid stats are: "line_count", "function_count", "comment_line_count",
1414
"inline_comment_count", "indentation_level"
1515
16+
1617
Returns:
1718
dict: Dictionary containing the requested stats and file information
1819

spice/analyzers/count_comment_ratio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def count_comment_ratio(path):
1111
'.go': {'single': [r'//'], 'multi': [('/*', '*/')]},
1212
'.rb': {'single': [r'#'], 'multi': []},
1313
}
14+
1415

1516
def analyze_file(file_path, ext):
1617
nonlocal total_comments, total_lines

tests/cli/commands/test_version.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,7 @@ def test_version_command_read_error(mock_exists, mock_get_translation, capsys):
8989

9090
mock_exists.assert_called_once_with(EXPECTED_SETUP_PATH)
9191
mock_file.assert_called_once_with(EXPECTED_SETUP_PATH, "r")
92-
assert "Error: Permission denied" in captured.out
92+
assert "Error: Permission denied" in captured.out
93+
94+
95+

utils/get_lang.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ def get_lexer_for_file(file_path):
1919
return "go"
2020

2121
else:
22-
raise ValueError(f"Unsupported file extension: {ext}")
22+
raise ValueError(f"Unsupported file extension: {ext}")
23+

0 commit comments

Comments
 (0)