Blinter 1.0.2__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 (34) hide show
  1. blinter-1.0.2/.coveragerc +185 -0
  2. blinter-1.0.2/.gitattributes +190 -0
  3. blinter-1.0.2/.github/FUNDING.yml +15 -0
  4. blinter-1.0.2/.github/workflows/Build-Release-PYPI.yml +134 -0
  5. blinter-1.0.2/.gitignore +217 -0
  6. blinter-1.0.2/Blinter.egg-info/PKG-INFO +243 -0
  7. blinter-1.0.2/Blinter.egg-info/SOURCES.txt +32 -0
  8. blinter-1.0.2/Blinter.egg-info/dependency_links.txt +1 -0
  9. blinter-1.0.2/Blinter.egg-info/entry_points.txt +2 -0
  10. blinter-1.0.2/Blinter.egg-info/requires.txt +18 -0
  11. blinter-1.0.2/Blinter.egg-info/top_level.txt +1 -0
  12. blinter-1.0.2/LICENSE.md +70 -0
  13. blinter-1.0.2/PKG-INFO +243 -0
  14. blinter-1.0.2/README.md +194 -0
  15. blinter-1.0.2/blinter.py +4130 -0
  16. blinter-1.0.2/docs/Batch-File-Linter-Requirements.md +1001 -0
  17. blinter-1.0.2/mypy.ini +53 -0
  18. blinter-1.0.2/pylintrc +434 -0
  19. blinter-1.0.2/pyproject.toml +142 -0
  20. blinter-1.0.2/pytest.ini +110 -0
  21. blinter-1.0.2/requirements-dev.txt +25 -0
  22. blinter-1.0.2/requirements.txt +2 -0
  23. blinter-1.0.2/setup.cfg +4 -0
  24. blinter-1.0.2/tests/__init__.py +1 -0
  25. blinter-1.0.2/tests/conftest.py +44 -0
  26. blinter-1.0.2/tests/test_configuration.py +254 -0
  27. blinter-1.0.2/tests/test_data_classes.py +233 -0
  28. blinter-1.0.2/tests/test_edge_cases.py +1605 -0
  29. blinter-1.0.2/tests/test_error_handling.py +463 -0
  30. blinter-1.0.2/tests/test_file_encoding.py +604 -0
  31. blinter-1.0.2/tests/test_lint_functionality.py +1322 -0
  32. blinter-1.0.2/tests/test_main_cli.py +1333 -0
  33. blinter-1.0.2/tests/test_output_functions.py +384 -0
  34. blinter-1.0.2/tests/test_thread_safety.py +315 -0
@@ -0,0 +1,185 @@
1
+ [run]
2
+ # Source code directories
3
+ source = blinter.py
4
+
5
+ # Exclude patterns
6
+ omit =
7
+ */tests/*
8
+ */test_*
9
+ */__pycache__/*
10
+ */.*
11
+ */venv/*
12
+ */env/*
13
+ */build/*
14
+ */dist/*
15
+ */htmlcov/*
16
+ */coverage/*
17
+ */.tox/*
18
+ */.pytest_cache/*
19
+ */.mypy_cache/*
20
+ */site-packages/*
21
+ setup.py
22
+ conftest.py
23
+ */migrations/*
24
+ */locale/*
25
+ */static/*
26
+ */media/*
27
+ */node_modules/*
28
+
29
+ # Branch coverage
30
+ branch = True
31
+
32
+ # Concurrency support (for multi-threading/multiprocessing)
33
+ concurrency = thread,multiprocessing
34
+
35
+ # Data file location
36
+ data_file = .coverage
37
+
38
+ # Parallel mode for multiple processes
39
+ parallel = False
40
+
41
+ # Relative file paths in reports
42
+ relative_files = True
43
+
44
+ [report]
45
+ # Fail if coverage is under this percentage
46
+ fail_under = 95.0
47
+
48
+ # Show missing line numbers
49
+ show_missing = True
50
+
51
+ # Skip covered files
52
+ skip_covered = False
53
+
54
+ # Skip empty files
55
+ skip_empty = False
56
+
57
+ # Precision for coverage percentages
58
+ precision = 2
59
+
60
+ # Sort results
61
+ sort = Cover
62
+
63
+ # Include source code in HTML report (contexts may not be supported in all versions)
64
+
65
+ # Exclude lines from coverage analysis
66
+ exclude_lines =
67
+ # Have to re-enable the standard pragma
68
+ pragma: no cover
69
+
70
+ # Don't complain about missing debug-only code:
71
+ def __repr__
72
+ if self\.debug
73
+
74
+ # Don't complain if tests don't hit defensive assertion code:
75
+ raise AssertionError
76
+ raise NotImplementedError
77
+
78
+ # Don't complain if non-runnable code isn't run:
79
+ if 0:
80
+ if False:
81
+ if __name__ .__eq__ .__main__.:
82
+
83
+ # Don't complain about abstract methods
84
+ @(abc\.)?abstractmethod
85
+
86
+ # Don't complain about type checking imports
87
+ if TYPE_CHECKING:
88
+
89
+ # Don't complain about platform specific code
90
+ pragma: no cover
91
+
92
+ # Don't complain about debug code
93
+ if DEBUG:
94
+
95
+ # Don't complain about version checks
96
+ if sys.version_info
97
+
98
+ # Don't complain about OS specific code
99
+ if os.name
100
+ if platform.system
101
+
102
+ # Don't complain about import fallbacks
103
+ except ImportError:
104
+ except ModuleNotFoundError:
105
+
106
+ # Don't complain about protocol stubs
107
+ \.\.\.
108
+
109
+ # Partial branches to exclude
110
+ partial_branches =
111
+ # Have to re-enable the standard pragma
112
+ pragma: no branch
113
+
114
+ # Don't complain about non-runnable code:
115
+ if 0:
116
+ if False:
117
+ if __name__ .__eq__ .__main__.:
118
+
119
+ # Regular expressions for excluding lines
120
+ exclude_also =
121
+ # Type checking imports
122
+ if TYPE_CHECKING:
123
+
124
+ # Platform checks
125
+ if sys\.platform
126
+ if os\.name
127
+
128
+ # Version checks
129
+ if sys\.version_info
130
+
131
+ # Abstract methods
132
+ @abc\.abstractmethod
133
+
134
+ # Debug code
135
+ if DEBUG:
136
+ if __debug__:
137
+
138
+ # Ignore errors
139
+ ignore_errors = False
140
+
141
+ [html]
142
+ # HTML output directory
143
+ directory = htmlcov
144
+
145
+ # Title for HTML report
146
+ title = Coverage Report for blinter (Batch File Linter)
147
+
148
+ # Show contexts in HTML report (removed - not supported in all versions)
149
+
150
+ # Skip files with 100% coverage in HTML report
151
+ skip_covered = False
152
+
153
+ # Skip empty files in HTML report
154
+ skip_empty = False
155
+
156
+ # Extra CSS for HTML report
157
+ extra_css =
158
+
159
+ # Custom template directory (removed - not supported in all versions)
160
+
161
+ [xml]
162
+ # XML output file
163
+ output = coverage.xml
164
+
165
+ # Package depth for XML report
166
+ package_depth = 99
167
+
168
+ [json]
169
+ # JSON output file
170
+ output = coverage.json
171
+
172
+ # Pretty print JSON
173
+ pretty_print = True
174
+
175
+ # Show contexts in JSON (removed - not supported in all versions)
176
+
177
+ [lcov]
178
+ # LCOV output file
179
+ output = coverage.lcov
180
+
181
+ [paths]
182
+ # Path mapping for different environments
183
+ source =
184
+ blinter.py
185
+ */site-packages/blinter.py
@@ -0,0 +1,190 @@
1
+ # Set default behavior for all files - use auto normalization
2
+ * text=auto
3
+
4
+ # Windows-centric text files - use CRLF for better Windows compatibility
5
+ *.txt text eol=crlf
6
+ *.md text eol=crlf
7
+ *.json text eol=crlf
8
+ *.xml text eol=crlf
9
+ *.yml text eol=crlf
10
+ *.yaml text eol=crlf
11
+ *.toml text eol=crlf
12
+ *.ini text eol=crlf
13
+ *.cfg text eol=crlf
14
+ *.config text eol=crlf
15
+ *.log text eol=crlf
16
+ *.csv text eol=crlf
17
+ *.tsv text eol=crlf
18
+
19
+ # Source code files - CRLF for Windows development
20
+ *.c text eol=crlf
21
+ *.cpp text eol=crlf
22
+ *.cxx text eol=crlf
23
+ *.cc text eol=crlf
24
+ *.h text eol=crlf
25
+ *.hpp text eol=crlf
26
+ *.hxx text eol=crlf
27
+ *.cs text eol=crlf
28
+ *.vb text eol=crlf
29
+ *.fs text eol=crlf
30
+ *.fsx text eol=crlf
31
+ *.java text eol=crlf
32
+ *.kt text eol=crlf
33
+ *.scala text eol=crlf
34
+ *.py text eol=crlf
35
+ *.rb text eol=crlf
36
+ *.php text eol=crlf
37
+ *.js text eol=crlf
38
+ *.ts text eol=crlf
39
+ *.jsx text eol=crlf
40
+ *.tsx text eol=crlf
41
+ *.vue text eol=crlf
42
+ *.html text eol=crlf
43
+ *.htm text eol=crlf
44
+ *.css text eol=crlf
45
+ *.scss text eol=crlf
46
+ *.sass text eol=crlf
47
+ *.less text eol=crlf
48
+ *.go text eol=crlf
49
+ *.rs text eol=crlf
50
+ *.swift text eol=crlf
51
+ *.m text eol=crlf
52
+ *.mm text eol=crlf
53
+ *.pl text eol=crlf
54
+ *.pm text eol=crlf
55
+ *.sql text eol=crlf
56
+ *.lua text eol=crlf
57
+ *.r text eol=crlf
58
+ *.R text eol=crlf
59
+ *.tex text eol=crlf
60
+ *.bib text eol=crlf
61
+
62
+ # Windows-specific files
63
+ *.bat text eol=crlf
64
+ *.cmd text eol=crlf
65
+ *.reg text eol=crlf
66
+ *.ps1 text eol=crlf
67
+ *.psm1 text eol=crlf
68
+ *.psd1 text eol=crlf
69
+
70
+ # Project files - CRLF for Windows tools
71
+ *.sln text eol=crlf
72
+ *.vcxproj text eol=crlf
73
+ *.vcxproj.filters text eol=crlf
74
+ *.vcxproj.user text eol=crlf
75
+ *.csproj text eol=crlf
76
+ *.vbproj text eol=crlf
77
+ *.fsproj text eol=crlf
78
+ *.props text eol=crlf
79
+ *.targets text eol=crlf
80
+ *.nuspec text eol=crlf
81
+
82
+ # Git files - CRLF for consistency on Windows
83
+ .gitignore text eol=crlf
84
+ .gitattributes text eol=crlf
85
+ .gitmodules text eol=crlf
86
+
87
+ # Build files that benefit from CRLF on Windows
88
+ *.cmake text eol=crlf
89
+ CMakeLists.txt text eol=crlf
90
+
91
+ # Files that should explicitly use LF (cross-platform compatibility required)
92
+ *.sh text eol=lf
93
+ *.bash text eol=lf
94
+ *.zsh text eol=lf
95
+ *.fish text eol=lf
96
+ Dockerfile text eol=lf
97
+ *.dockerfile text eol=lf
98
+ Makefile text eol=lf
99
+ makefile text eol=lf
100
+ *.mk text eol=lf
101
+
102
+ # Binary files (explicitly marked to avoid any processing)
103
+ *.exe binary
104
+ *.dll binary
105
+ *.so binary
106
+ *.dylib binary
107
+ *.a binary
108
+ *.lib binary
109
+ *.obj binary
110
+ *.o binary
111
+ *.pdb binary
112
+ *.idb binary
113
+ *.pch binary
114
+ *.res binary
115
+ *.rc2 binary
116
+
117
+ # Images
118
+ *.png binary
119
+ *.jpg binary
120
+ *.jpeg binary
121
+ *.gif binary
122
+ *.bmp binary
123
+ *.ico binary
124
+ *.svg binary
125
+ *.tiff binary
126
+ *.webp binary
127
+
128
+ # Archives and compressed files
129
+ *.zip binary
130
+ *.7z binary
131
+ *.rar binary
132
+ *.tar binary
133
+ *.gz binary
134
+ *.bz2 binary
135
+ *.xz binary
136
+ *.lz4 binary
137
+
138
+ # Media files
139
+ *.mp3 binary
140
+ *.mp4 binary
141
+ *.avi binary
142
+ *.mov binary
143
+ *.wmv binary
144
+ *.flv binary
145
+ *.wav binary
146
+ *.ogg binary
147
+
148
+ # Office documents
149
+ *.doc binary
150
+ *.docx binary
151
+ *.xls binary
152
+ *.xlsx binary
153
+ *.ppt binary
154
+ *.pptx binary
155
+ *.pdf binary
156
+
157
+ # Fonts
158
+ *.ttf binary
159
+ *.otf binary
160
+ *.woff binary
161
+ *.woff2 binary
162
+ *.eot binary
163
+
164
+ # Database files
165
+ *.db binary
166
+ *.sqlite binary
167
+ *.sqlite3 binary
168
+ *.mdb binary
169
+
170
+ # Package files
171
+ *.nupkg binary
172
+ *.msi binary
173
+ *.pkg binary
174
+ *.deb binary
175
+ *.rpm binary
176
+
177
+ # Git LFS (Large File Storage) - uncomment if using LFS
178
+ # *.psd filter=lfs diff=lfs merge=lfs -text
179
+ # *.ai filter=lfs diff=lfs merge=lfs -text
180
+ # *.sketch filter=lfs diff=lfs merge=lfs -text
181
+
182
+ # Linguist overrides (for GitHub language detection)
183
+ *.sql linguist-detectable=true
184
+ *.html linguist-detectable=false
185
+ *.css linguist-detectable=false
186
+ vendor/* linguist-vendored
187
+ node_modules/* linguist-vendored
188
+ packages/* linguist-vendored
189
+ *.min.js linguist-generated
190
+ *.min.css linguist-generated
@@ -0,0 +1,15 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [tboy1337] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: tboy1337 # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12
+ polar: # Replace with a single Polar username
13
+ buy_me_a_coffee: tboy1337 # Replace with a single Buy Me a Coffee username
14
+ thanks_dev: # Replace with a single thanks.dev username
15
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,134 @@
1
+ name: "Build-Release-PYPI"
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ push:
8
+ branches:
9
+ - main
10
+ permissions:
11
+ contents: write
12
+ id-token: write
13
+
14
+ jobs:
15
+ build-windows:
16
+ runs-on: windows-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: '3.13'
23
+ - name: Create virtual environment
24
+ run: |
25
+ python -m venv venv
26
+ - name: Install dependencies in virtual environment
27
+ run: |
28
+ .\venv\Scripts\Activate.ps1
29
+ python -m pip install --upgrade pip
30
+ python -m pip install --upgrade setuptools
31
+ python -m pip install --upgrade wheel
32
+ python -m pip install --upgrade pyinstaller
33
+ python -m pip install --upgrade -r requirements.txt
34
+ shell: pwsh
35
+ - name: Build executable
36
+ run: |
37
+ .\venv\Scripts\Activate.ps1
38
+ pyinstaller --onefile --name Blinter blinter.py
39
+ shell: pwsh
40
+ - name: Rename executable
41
+ run: |
42
+ Rename-Item -Path dist/Blinter.exe -NewName Blinter-v1.0.${{ github.run_number }}-windows.exe
43
+ shell: pwsh
44
+ - name: Zip the exe
45
+ run: |
46
+ Compress-Archive -Path "dist/Blinter-v1.0.${{ github.run_number }}-windows.exe" -DestinationPath "dist/Blinter-v1.0.${{ github.run_number }}-windows.zip"
47
+ shell: pwsh
48
+ - name: Upload artifact
49
+ uses: actions/upload-artifact@v4
50
+ with:
51
+ name: windows-build
52
+ path: dist/Blinter-v1.0.${{ github.run_number }}-windows.zip
53
+
54
+ build-wheels:
55
+ name: Build Python wheels
56
+ runs-on: ubuntu-latest
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+
60
+ - name: Set up Python
61
+ uses: actions/setup-python@v5
62
+ with:
63
+ python-version: '3.13'
64
+
65
+ - name: Install dependencies
66
+ run: |
67
+ python -m pip install --upgrade pip
68
+ python -m pip install --upgrade setuptools
69
+ python -m pip install --upgrade wheel
70
+ python -m pip install --upgrade build
71
+
72
+ - name: Build pure Python wheel and sdist
73
+ run: |
74
+ python -m build
75
+
76
+ - name: Store artifacts
77
+ uses: actions/upload-artifact@v4
78
+ with:
79
+ name: python-dist
80
+ path: dist/
81
+
82
+ create-release:
83
+ needs: [build-windows, build-wheels]
84
+ runs-on: ubuntu-latest
85
+ steps:
86
+ - uses: actions/checkout@v4
87
+ - name: Download Windows build
88
+ uses: actions/download-artifact@v4
89
+ with:
90
+ name: windows-build
91
+ path: ./build
92
+ - name: Download Python distribution
93
+ uses: actions/download-artifact@v4
94
+ with:
95
+ name: python-dist
96
+ path: ./build
97
+ - name: Create GitHub Release
98
+ uses: ncipollo/release-action@v1
99
+ with:
100
+ artifacts: ./build/*
101
+ tag: v1.0.${{ github.run_number }}
102
+ token: ${{ secrets.GITHUB_TOKEN }}
103
+
104
+ publish-pypi:
105
+ name: Publish wheels to PyPI
106
+ needs: build-wheels
107
+ runs-on: ubuntu-latest
108
+
109
+ steps:
110
+ - name: Download artifacts
111
+ uses: actions/download-artifact@v4
112
+ with:
113
+ name: python-dist
114
+ path: dist
115
+
116
+ - name: Setup python
117
+ uses: actions/setup-python@v5
118
+ with:
119
+ python-version: '3.13'
120
+
121
+ - name: Install Twine
122
+ run: |
123
+ python -m pip install --upgrade pip
124
+ python -m pip install --upgrade setuptools
125
+ python -m pip install --upgrade wheel
126
+ python -m pip install --upgrade twine
127
+
128
+ - name: Publish to PyPI
129
+ env:
130
+ TWINE_USERNAME: __token__
131
+ TWINE_PASSWORD: ${{ secrets.PYPI_BLINTER }}
132
+ run: |
133
+ twine check dist/*
134
+ twine upload dist/*