-
Notifications
You must be signed in to change notification settings - Fork 8
Remove cached files and remove Lint from CI #36
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
Changes from all commits
85c1d4d
9d09e10
ba9f100
5434e9d
7188a2a
1ef5536
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,8 @@ jobs: | |
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest | ||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
|
||
# - name: Test with pytest | ||
# run: | | ||
# pytest | ||
Comment on lines
+38
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Critical: Re-enable pytest in the CI workflow The codebase contains a comprehensive test suite with 14 test files covering various components (endpoints, analyzers, git operations, etc.). The test file examined shows proper unit tests using the unittest framework. Disabling pytest in the CI workflow means these tests are not being executed during integration, which could indeed lead to undetected issues.
🔗 Analysis chainCritical: Test execution has been disabled Commenting out the pytest step removes all automated testing, which could lead to undetected bugs and regressions. This is a significant concern for code quality and reliability. Let's verify the presence of tests in the codebase: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check for test files and their count
echo "Searching for test files..."
fd -e py | grep -i test
Length of output: 522 Script: #!/bin/bash
# Check if there are any other CI/CD workflow files that might be running tests
echo "Checking for other workflow files..."
fd workflow .github/
# Check the content of pytest configuration
echo -e "\nChecking for pytest configuration..."
fd pytest.ini
fd conftest.py
# Let's also check the content of a sample test file to verify they are actual tests
echo -e "\nChecking content of a test file..."
cat tests/test_py_analyzer.py
Length of output: 2512 Script: #!/bin/bash
# Let's check if there are any other workflow files that might be running tests
echo "Checking contents of workflow directory..."
ls -la .github/workflows/
# And check the content of python-app.yml to see the complete context
echo -e "\nChecking content of python-app.yml..."
cat .github/workflows/python-app.yml
Length of output: 1628 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,77 @@ | ||
# Python | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
__pycache__/ | ||
*.env | ||
.venv/ | ||
env/ | ||
venv/ | ||
ENV/ | ||
*.egg-info/ | ||
*.egg | ||
pip-log.txt | ||
|
||
# Flask | ||
instance/ | ||
*.sqlite3 | ||
*.db | ||
*.bak | ||
instance/config.py | ||
instance/*.secret | ||
|
||
# Environment Variables | ||
.env | ||
.env.* | ||
|
||
# Logs | ||
logs/ | ||
*.log | ||
*.out | ||
*.err | ||
|
||
# Pytest and Coverage | ||
.pytest_cache/ | ||
.coverage | ||
.tox/ | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.cache | ||
|
||
# IDEs and Editors | ||
.vscode/ | ||
.idea/.env | ||
.vercel | ||
|
||
# ignore the .pyc files | ||
*.pyc | ||
|
||
dist/ | ||
# Node (if using npm/yarn for assets) | ||
node_modules/ | ||
*.lock | ||
|
||
# Static assets (if generated) | ||
static/ | ||
dist/ | ||
build/ | ||
|
||
# Docker | ||
*.pid | ||
docker-compose.override.yml | ||
|
||
# Heroku | ||
*.buildpacks | ||
*.env.local | ||
*.env.production | ||
*.env.*.local | ||
|
||
# Miscellaneous | ||
*.bak | ||
*.tmp | ||
*.log.* | ||
Thumbs.db | ||
|
||
# Vercel | ||
.vercel |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,3 @@ | |
from .function import Function | ||
from .argument import Argument | ||
from .entity_encoder import * | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from typing import Optional | ||
from typing import List, Optional | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix type annotations and improve id attribute handling
Apply these fixes: -from typing import List, Optional
+from typing import List, Optional, Union
class Struct():
def __init__(self, path: str, name: str, doc: Optional[str],
src_start: int, src_end: int) -> None:
- self.fields: List[List[str, str]] = []
+ self.fields: List[List[str]] = []
+ self.id: Optional[str] = None
def __str__(self) -> str:
return f"""
- id: {self.id if hasattr(self, 'id') else 'Unknown'} # type: ignore
+ id: {self.id or 'Unknown'} Also applies to: 31-31 |
||
class Struct(): | ||
""" | ||
|
@@ -28,7 +28,7 @@ def __init__(self, path: str, name: str, doc: Optional[str], | |
|
||
def __str__(self) -> str: | ||
return f""" | ||
id: {self.id if hasattr(self, 'id') else 'Unknown'} | ||
id: {self.id if hasattr(self, 'id') else 'Unknown'} # type: ignore | ||
path: {self.path} | ||
name: {self.name} | ||
doc: {self.doc} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Linting is properly configured with Ruff, but workflow needs updating
The commented-out flake8 checks are actually replaced by Ruff (as seen in ruff.toml), which provides more comprehensive linting including pycodestyle, Pyflakes, flake8-bugbear, and flake8-simplify rules. However, the GitHub Actions workflow hasn't been updated to use Ruff instead of flake8.
🔗 Analysis chain
Reconsider commenting out extended linting checks
The removal of extended flake8 checks (complexity, line length) combined with the deletion of the Pylint workflow significantly reduces code quality enforcement. Consider keeping these checks to maintain code quality standards.
Let's check if there are any other linting configurations in the project:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 196
Script:
Length of output: 2527
Script:
Length of output: 1695
🧰 Tools
🪛 yamllint (1.35.1)
[error] 37-37: trailing spaces
(trailing-spaces)