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.
Files changed (86) hide show
  1. scantool-0.9.1/.github/workflows/publish.yml +39 -0
  2. scantool-0.9.1/.github/workflows/test.yml +49 -0
  3. scantool-0.9.1/.gitignore +28 -0
  4. scantool-0.9.1/.python-version +1 -0
  5. scantool-0.9.1/CONTRIBUTING.md +666 -0
  6. scantool-0.9.1/Dockerfile +32 -0
  7. scantool-0.9.1/LICENSE +21 -0
  8. scantool-0.9.1/PKG-INFO +536 -0
  9. scantool-0.9.1/README.md +496 -0
  10. scantool-0.9.1/pyproject.toml +57 -0
  11. scantool-0.9.1/smithery.yaml +8 -0
  12. scantool-0.9.1/src/scantool/__init__.py +7 -0
  13. scantool-0.9.1/src/scantool/directory_formatter.py +364 -0
  14. scantool-0.9.1/src/scantool/formatter.py +153 -0
  15. scantool-0.9.1/src/scantool/gitignore.py +145 -0
  16. scantool-0.9.1/src/scantool/glob_expander.py +48 -0
  17. scantool-0.9.1/src/scantool/scanner.py +236 -0
  18. scantool-0.9.1/src/scantool/scanners/__init__.py +94 -0
  19. scantool-0.9.1/src/scantool/scanners/_template.py +340 -0
  20. scantool-0.9.1/src/scantool/scanners/base.py +175 -0
  21. scantool-0.9.1/src/scantool/scanners/c_cpp_scanner.py +605 -0
  22. scantool-0.9.1/src/scantool/scanners/csharp_scanner.py +633 -0
  23. scantool-0.9.1/src/scantool/scanners/go_scanner.py +339 -0
  24. scantool-0.9.1/src/scantool/scanners/image_scanner.py +241 -0
  25. scantool-0.9.1/src/scantool/scanners/java_scanner.py +499 -0
  26. scantool-0.9.1/src/scantool/scanners/markdown_scanner.py +369 -0
  27. scantool-0.9.1/src/scantool/scanners/php_scanner.py +539 -0
  28. scantool-0.9.1/src/scantool/scanners/python_scanner.py +329 -0
  29. scantool-0.9.1/src/scantool/scanners/ruby_scanner.py +339 -0
  30. scantool-0.9.1/src/scantool/scanners/rust_scanner.py +481 -0
  31. scantool-0.9.1/src/scantool/scanners/text_scanner.py +101 -0
  32. scantool-0.9.1/src/scantool/scanners/typescript_scanner.py +505 -0
  33. scantool-0.9.1/src/scantool/server.py +386 -0
  34. scantool-0.9.1/tests/c_cpp/samples/basic.c +59 -0
  35. scantool-0.9.1/tests/c_cpp/samples/basic.cpp +138 -0
  36. scantool-0.9.1/tests/c_cpp/samples/basic.h +141 -0
  37. scantool-0.9.1/tests/c_cpp/samples/edge_cases.cpp +277 -0
  38. scantool-0.9.1/tests/c_cpp/test_c_cpp.py +285 -0
  39. scantool-0.9.1/tests/conftest.py +107 -0
  40. scantool-0.9.1/tests/csharp/samples/Basic.cs +169 -0
  41. scantool-0.9.1/tests/csharp/samples/Broken.cs +66 -0
  42. scantool-0.9.1/tests/csharp/samples/EdgeCases.cs +348 -0
  43. scantool-0.9.1/tests/csharp/test_csharp.py +419 -0
  44. scantool-0.9.1/tests/go/samples/basic.go +90 -0
  45. scantool-0.9.1/tests/go/samples/broken.go +44 -0
  46. scantool-0.9.1/tests/go/samples/edge_cases.go +148 -0
  47. scantool-0.9.1/tests/go/test_go.py +171 -0
  48. scantool-0.9.1/tests/images/samples/large_noisy.png +0 -0
  49. scantool-0.9.1/tests/images/samples/large_photo.png +0 -0
  50. scantool-0.9.1/tests/images/samples/test_icon.png +0 -0
  51. scantool-0.9.1/tests/images/samples/test_logo.png +0 -0
  52. scantool-0.9.1/tests/images/samples/test_photo.jpg +0 -0
  53. scantool-0.9.1/tests/images/samples/unused_alpha.png +0 -0
  54. scantool-0.9.1/tests/images/test_images.py +193 -0
  55. scantool-0.9.1/tests/java/samples/Basic.java +104 -0
  56. scantool-0.9.1/tests/java/samples/Broken.java +53 -0
  57. scantool-0.9.1/tests/java/samples/EdgeCases.java +280 -0
  58. scantool-0.9.1/tests/java/test_java.py +279 -0
  59. scantool-0.9.1/tests/markdown/samples/basic.md +118 -0
  60. scantool-0.9.1/tests/markdown/samples/edge_cases.md +184 -0
  61. scantool-0.9.1/tests/markdown/test_markdown.py +310 -0
  62. scantool-0.9.1/tests/php/samples/basic.php +132 -0
  63. scantool-0.9.1/tests/php/samples/broken.php +57 -0
  64. scantool-0.9.1/tests/php/samples/edge_cases.php +256 -0
  65. scantool-0.9.1/tests/php/test_php.py +296 -0
  66. scantool-0.9.1/tests/python/samples/basic.py +61 -0
  67. scantool-0.9.1/tests/python/samples/broken.py +43 -0
  68. scantool-0.9.1/tests/python/samples/edge_cases.py +161 -0
  69. scantool-0.9.1/tests/python/test_python.py +124 -0
  70. scantool-0.9.1/tests/ruby/samples/basic.rb +75 -0
  71. scantool-0.9.1/tests/ruby/samples/broken.rb +55 -0
  72. scantool-0.9.1/tests/ruby/samples/edge_cases.rb +223 -0
  73. scantool-0.9.1/tests/ruby/test_ruby.py +256 -0
  74. scantool-0.9.1/tests/rust/__init__.py +1 -0
  75. scantool-0.9.1/tests/rust/samples/basic.rs +89 -0
  76. scantool-0.9.1/tests/rust/samples/broken.rs +57 -0
  77. scantool-0.9.1/tests/rust/samples/edge_cases.rs +187 -0
  78. scantool-0.9.1/tests/rust/test_rust.py +188 -0
  79. scantool-0.9.1/tests/test_integration.py +74 -0
  80. scantool-0.9.1/tests/text/samples/basic.txt +76 -0
  81. scantool-0.9.1/tests/text/samples/edge_cases.txt +74 -0
  82. scantool-0.9.1/tests/text/test_text.py +122 -0
  83. scantool-0.9.1/tests/typescript/samples/basic.ts +116 -0
  84. scantool-0.9.1/tests/typescript/samples/jsx.tsx +200 -0
  85. scantool-0.9.1/tests/typescript/test_typescript.py +189 -0
  86. 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