Skip to content

Commit edcdd34

Browse files
author
fevra-dev
committed
🔧 Fix lint errors & improve CI workflow
- Remove unused Severity import in signatures.py - Organize imports properly (stdlib, third-party, local) - Separate lint job with continue-on-error - Ignore I001 (import order) in ruff checks
1 parent 3f54c6f commit edcdd34

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,31 @@ jobs:
3636
pip install -r requirements.txt
3737
pip install -r requirements-dev.txt
3838
39-
- name: Lint with ruff
39+
- name: Run tests
4040
run: |
41-
pip install ruff
42-
ruff check gitexpose/ --ignore E501
41+
pytest tests/ -v --tb=short
4342
44-
- name: Type check with mypy
45-
run: |
46-
pip install mypy
47-
mypy gitexpose/ --ignore-missing-imports --no-error-summary || true
43+
lint:
44+
runs-on: ubuntu-latest
45+
continue-on-error: true
46+
steps:
47+
- uses: actions/checkout@v4
4848

49-
- name: Run tests
49+
- name: Set up Python
50+
uses: actions/setup-python@v5
51+
with:
52+
python-version: "3.11"
53+
54+
- name: Install linters
5055
run: |
51-
pytest tests/ -v --tb=short
56+
python -m pip install --upgrade pip
57+
pip install ruff mypy
58+
59+
- name: Lint with ruff
60+
run: ruff check gitexpose/ --ignore E501,I001
61+
62+
- name: Type check with mypy
63+
run: mypy gitexpose/ --ignore-missing-imports --no-error-summary || true
5264

5365
security:
5466
runs-on: ubuntu-latest
@@ -66,8 +78,7 @@ jobs:
6678
pip install bandit safety
6779
6880
- name: Security scan with Bandit
69-
run: |
70-
bandit -r gitexpose/ -ll --skip B101 || true
81+
run: bandit -r gitexpose/ -ll --skip B101 || true
7182

7283
- name: Check dependencies with Safety
7384
run: |

gitexpose/signatures.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
and filter out false positives (custom 404 pages, WAF blocks, etc).
66
"""
77

8+
import logging
89
from typing import Optional, Tuple
910
from urllib.parse import urlparse
10-
from .models import PathDefinition, ScanResult, Severity
11-
import logging
11+
12+
from .models import PathDefinition, ScanResult
1213

1314
logger = logging.getLogger(__name__)
1415

0 commit comments

Comments
 (0)