scantool 0.9.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scantool-0.9.1/.github/workflows/publish.yml +39 -0
- scantool-0.9.1/.github/workflows/test.yml +49 -0
- scantool-0.9.1/.gitignore +28 -0
- scantool-0.9.1/.python-version +1 -0
- scantool-0.9.1/CONTRIBUTING.md +666 -0
- scantool-0.9.1/Dockerfile +32 -0
- scantool-0.9.1/LICENSE +21 -0
- scantool-0.9.1/PKG-INFO +536 -0
- scantool-0.9.1/README.md +496 -0
- scantool-0.9.1/pyproject.toml +57 -0
- scantool-0.9.1/smithery.yaml +8 -0
- scantool-0.9.1/src/scantool/__init__.py +7 -0
- scantool-0.9.1/src/scantool/directory_formatter.py +364 -0
- scantool-0.9.1/src/scantool/formatter.py +153 -0
- scantool-0.9.1/src/scantool/gitignore.py +145 -0
- scantool-0.9.1/src/scantool/glob_expander.py +48 -0
- scantool-0.9.1/src/scantool/scanner.py +236 -0
- scantool-0.9.1/src/scantool/scanners/__init__.py +94 -0
- scantool-0.9.1/src/scantool/scanners/_template.py +340 -0
- scantool-0.9.1/src/scantool/scanners/base.py +175 -0
- scantool-0.9.1/src/scantool/scanners/c_cpp_scanner.py +605 -0
- scantool-0.9.1/src/scantool/scanners/csharp_scanner.py +633 -0
- scantool-0.9.1/src/scantool/scanners/go_scanner.py +339 -0
- scantool-0.9.1/src/scantool/scanners/image_scanner.py +241 -0
- scantool-0.9.1/src/scantool/scanners/java_scanner.py +499 -0
- scantool-0.9.1/src/scantool/scanners/markdown_scanner.py +369 -0
- scantool-0.9.1/src/scantool/scanners/php_scanner.py +539 -0
- scantool-0.9.1/src/scantool/scanners/python_scanner.py +329 -0
- scantool-0.9.1/src/scantool/scanners/ruby_scanner.py +339 -0
- scantool-0.9.1/src/scantool/scanners/rust_scanner.py +481 -0
- scantool-0.9.1/src/scantool/scanners/text_scanner.py +101 -0
- scantool-0.9.1/src/scantool/scanners/typescript_scanner.py +505 -0
- scantool-0.9.1/src/scantool/server.py +386 -0
- scantool-0.9.1/tests/c_cpp/samples/basic.c +59 -0
- scantool-0.9.1/tests/c_cpp/samples/basic.cpp +138 -0
- scantool-0.9.1/tests/c_cpp/samples/basic.h +141 -0
- scantool-0.9.1/tests/c_cpp/samples/edge_cases.cpp +277 -0
- scantool-0.9.1/tests/c_cpp/test_c_cpp.py +285 -0
- scantool-0.9.1/tests/conftest.py +107 -0
- scantool-0.9.1/tests/csharp/samples/Basic.cs +169 -0
- scantool-0.9.1/tests/csharp/samples/Broken.cs +66 -0
- scantool-0.9.1/tests/csharp/samples/EdgeCases.cs +348 -0
- scantool-0.9.1/tests/csharp/test_csharp.py +419 -0
- scantool-0.9.1/tests/go/samples/basic.go +90 -0
- scantool-0.9.1/tests/go/samples/broken.go +44 -0
- scantool-0.9.1/tests/go/samples/edge_cases.go +148 -0
- scantool-0.9.1/tests/go/test_go.py +171 -0
- scantool-0.9.1/tests/images/samples/large_noisy.png +0 -0
- scantool-0.9.1/tests/images/samples/large_photo.png +0 -0
- scantool-0.9.1/tests/images/samples/test_icon.png +0 -0
- scantool-0.9.1/tests/images/samples/test_logo.png +0 -0
- scantool-0.9.1/tests/images/samples/test_photo.jpg +0 -0
- scantool-0.9.1/tests/images/samples/unused_alpha.png +0 -0
- scantool-0.9.1/tests/images/test_images.py +193 -0
- scantool-0.9.1/tests/java/samples/Basic.java +104 -0
- scantool-0.9.1/tests/java/samples/Broken.java +53 -0
- scantool-0.9.1/tests/java/samples/EdgeCases.java +280 -0
- scantool-0.9.1/tests/java/test_java.py +279 -0
- scantool-0.9.1/tests/markdown/samples/basic.md +118 -0
- scantool-0.9.1/tests/markdown/samples/edge_cases.md +184 -0
- scantool-0.9.1/tests/markdown/test_markdown.py +310 -0
- scantool-0.9.1/tests/php/samples/basic.php +132 -0
- scantool-0.9.1/tests/php/samples/broken.php +57 -0
- scantool-0.9.1/tests/php/samples/edge_cases.php +256 -0
- scantool-0.9.1/tests/php/test_php.py +296 -0
- scantool-0.9.1/tests/python/samples/basic.py +61 -0
- scantool-0.9.1/tests/python/samples/broken.py +43 -0
- scantool-0.9.1/tests/python/samples/edge_cases.py +161 -0
- scantool-0.9.1/tests/python/test_python.py +124 -0
- scantool-0.9.1/tests/ruby/samples/basic.rb +75 -0
- scantool-0.9.1/tests/ruby/samples/broken.rb +55 -0
- scantool-0.9.1/tests/ruby/samples/edge_cases.rb +223 -0
- scantool-0.9.1/tests/ruby/test_ruby.py +256 -0
- scantool-0.9.1/tests/rust/__init__.py +1 -0
- scantool-0.9.1/tests/rust/samples/basic.rs +89 -0
- scantool-0.9.1/tests/rust/samples/broken.rs +57 -0
- scantool-0.9.1/tests/rust/samples/edge_cases.rs +187 -0
- scantool-0.9.1/tests/rust/test_rust.py +188 -0
- scantool-0.9.1/tests/test_integration.py +74 -0
- scantool-0.9.1/tests/text/samples/basic.txt +76 -0
- scantool-0.9.1/tests/text/samples/edge_cases.txt +74 -0
- scantool-0.9.1/tests/text/test_text.py +122 -0
- scantool-0.9.1/tests/typescript/samples/basic.ts +116 -0
- scantool-0.9.1/tests/typescript/samples/jsx.tsx +200 -0
- scantool-0.9.1/tests/typescript/test_typescript.py +189 -0
- scantool-0.9.1/uv.lock +1779 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
name: Build and publish to PyPI
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment:
|
|
15
|
+
name: pypi
|
|
16
|
+
url: https://pypi.org/p/scantool
|
|
17
|
+
permissions:
|
|
18
|
+
id-token: write # Required for trusted publishing
|
|
19
|
+
attestations: write # Required for package attestations
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout code
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: '3.11'
|
|
29
|
+
|
|
30
|
+
- name: Install uv
|
|
31
|
+
uses: astral-sh/setup-uv@v4
|
|
32
|
+
|
|
33
|
+
- name: Build package
|
|
34
|
+
run: uv build
|
|
35
|
+
|
|
36
|
+
- name: Publish to PyPI
|
|
37
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
38
|
+
# This uses PyPI Trusted Publishers - no token needed!
|
|
39
|
+
# Just configure on PyPI: https://pypi.org/manage/account/publishing/
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Test on ${{ matrix.os }} with Python ${{ matrix.python-version }}
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
17
|
+
python-version: ['3.11', '3.12', '3.13']
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout code
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install uv
|
|
29
|
+
uses: astral-sh/setup-uv@v4
|
|
30
|
+
with:
|
|
31
|
+
enable-cache: true
|
|
32
|
+
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: uv sync --locked --extra dev
|
|
35
|
+
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: uv run pytest -v
|
|
38
|
+
|
|
39
|
+
- name: Run tests with coverage
|
|
40
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
|
|
41
|
+
run: |
|
|
42
|
+
uv run pytest --cov=src/scantool --cov-report=xml
|
|
43
|
+
|
|
44
|
+
- name: Upload coverage
|
|
45
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
|
|
46
|
+
uses: codecov/codecov-action@v4
|
|
47
|
+
with:
|
|
48
|
+
files: ./coverage.xml
|
|
49
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
.eggs/
|
|
9
|
+
|
|
10
|
+
# Virtual environments
|
|
11
|
+
.venv
|
|
12
|
+
|
|
13
|
+
# UV
|
|
14
|
+
# uv.lock
|
|
15
|
+
|
|
16
|
+
# IDE
|
|
17
|
+
.vscode/
|
|
18
|
+
.idea/
|
|
19
|
+
*.swp
|
|
20
|
+
*.swo
|
|
21
|
+
|
|
22
|
+
# OS
|
|
23
|
+
.DS_Store
|
|
24
|
+
|
|
25
|
+
# Temporary files
|
|
26
|
+
*.tmp
|
|
27
|
+
*.bak
|
|
28
|
+
.cache/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|