vsstubs 1.0.0__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.
@@ -0,0 +1,215 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
208
+
209
+
210
+ # vsjet
211
+ .vsjet
212
+
213
+ # Test files (I know this is bad)
214
+ test.*
215
+ test_*.*
vsstubs-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Vardë
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
vsstubs-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.4
2
+ Name: vsstubs
3
+ Version: 1.0.0
4
+ Summary: Typing stubs for VapourSynth
5
+ Project-URL: Homepage, https://github.com/Ichunjo/vs-stubs
6
+ Project-URL: Repository, https://github.com/Ichunjo/vs-stubs
7
+ Project-URL: Issues, https://github.com/Ichunjo/vs-stubs/issues
8
+ Author-email: Vardë <ichunjo.le.terrible@gmail.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: python,stubs,typing
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Topic :: Software Development :: Code Generators
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Utilities
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.13
24
+ Requires-Dist: rich
25
+ Requires-Dist: typer
26
+ Requires-Dist: vapoursynth>=73
27
+ Description-Content-Type: text/markdown
28
+
29
+ # vs-stubs
30
+
31
+ **Typing stubs for [VapourSynth](http://www.vapoursynth.com/)**
32
+
33
+ `vs-stubs` provides Python type stubs for VapourSynth plugins and core functions. This helps editors, IDEs, and static type checkers (e.g. `mypy`, `pyright`) understand VapourSynth’s API.
34
+
35
+ ---
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ pip install vsstubs
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Usage
46
+
47
+ You can use `vsstubs` via the command line or as a Python module.
48
+
49
+ ### Command Line
50
+
51
+ ```bash
52
+ vsstubs
53
+ ```
54
+
55
+ Example:
56
+
57
+ ```bash
58
+ vsstubs -o output.pyi --template
59
+ ```
60
+
61
+ ### Python API
62
+
63
+ ```python
64
+ from vsstubs import output_stubs
65
+
66
+ # Example usage
67
+ output_stubs(None, "output.pyi", template=True)
68
+ ```
69
+
70
+ ---
71
+
72
+ ## CLI Reference
73
+
74
+ ```
75
+ Usage: vsstubs [OPTIONS] COMMAND [ARGS]...
76
+
77
+ vs-stubs command line interface
78
+
79
+ ╭─ Options ──────────────────────────────────────────────────────────────────────────────────╮
80
+ │ --template -T Export blank template; excludes existing plugins unless --load or │
81
+ │ --add is used │
82
+ │ --check -C Check for new plugins or new plugin signatures │
83
+ │ --help Show this message and exit. │
84
+ ╰────────────────────────────────────────────────────────────────────────────────────────────╯
85
+ ╭─ I/O options ──────────────────────────────────────────────────────────────────────────────╮
86
+ │ --input -i,-I PATH Path to the input .pyi file │
87
+ │ --output -o,-O TEXT Path to write the output .pyi file. Use '@' to overwrite the │
88
+ │ input file. │
89
+ │ [default: (vapoursynth-stubs/__init__.pyi inside the │
90
+ │ site-package folder)] │
91
+ │ --load -L PATH Load plugins from a folder or a single library file │
92
+ ╰────────────────────────────────────────────────────────────────────────────────────────────╯
93
+ ╭─ Informations ─────────────────────────────────────────────────────────────────────────────╮
94
+ │ --quiet Suppress non-error output │
95
+ │ --version -V Show version info and exit │
96
+ ╰────────────────────────────────────────────────────────────────────────────────────────────╯
97
+ ╭─ Commands ─────────────────────────────────────────────────────────────────────────────────╮
98
+ │ add Add or update the specified plugins in the stubs │
99
+ │ remove Remove the specified plugins from the stubs │
100
+ ╰────────────────────────────────────────────────────────────────────────────────────────────╯
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Examples
106
+
107
+ - Simply update the VapourSynth stubs:
108
+
109
+ ```bash
110
+ vsstubs
111
+ ```
112
+
113
+ - Generate a template stubs:
114
+
115
+ ```bash
116
+ vsstubs -o out.pyi --template
117
+ ```
118
+
119
+ - Add plugin stubs:
120
+
121
+ ```bash
122
+ vsstubs -i out.pyi -o @ add resize2
123
+ ```
124
+
125
+ - Remove plugin stubs (On Powershell you will need to escape the `@` character):
126
+
127
+ ```pwsh
128
+ vsstubs -i out.pyi -o "@" remove resize2
129
+ ```
130
+
131
+ ---
132
+
133
+ ## License
134
+
135
+ MIT
136
+
137
+ ---
138
+
139
+ ## Why use this over `vsrepo genstubs`?
140
+
141
+ - **Much faster** than `genstubs`.
142
+ - **More accurate typing**: the generated stubs better reflect the actual signatures of plugins, core classes, and functions.
143
+ - **Modern Python typing**.
144
+ - Easier to **maintain** and **extend** than `genstubs`.
145
+ - More **flexible workflow**: supports generating blank templates, checking for new plugin signatures, and selectively adding/removing plugins.
@@ -0,0 +1,117 @@
1
+ # vs-stubs
2
+
3
+ **Typing stubs for [VapourSynth](http://www.vapoursynth.com/)**
4
+
5
+ `vs-stubs` provides Python type stubs for VapourSynth plugins and core functions. This helps editors, IDEs, and static type checkers (e.g. `mypy`, `pyright`) understand VapourSynth’s API.
6
+
7
+ ---
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install vsstubs
13
+ ```
14
+
15
+ ---
16
+
17
+ ## Usage
18
+
19
+ You can use `vsstubs` via the command line or as a Python module.
20
+
21
+ ### Command Line
22
+
23
+ ```bash
24
+ vsstubs
25
+ ```
26
+
27
+ Example:
28
+
29
+ ```bash
30
+ vsstubs -o output.pyi --template
31
+ ```
32
+
33
+ ### Python API
34
+
35
+ ```python
36
+ from vsstubs import output_stubs
37
+
38
+ # Example usage
39
+ output_stubs(None, "output.pyi", template=True)
40
+ ```
41
+
42
+ ---
43
+
44
+ ## CLI Reference
45
+
46
+ ```
47
+ Usage: vsstubs [OPTIONS] COMMAND [ARGS]...
48
+
49
+ vs-stubs command line interface
50
+
51
+ ╭─ Options ──────────────────────────────────────────────────────────────────────────────────╮
52
+ │ --template -T Export blank template; excludes existing plugins unless --load or │
53
+ │ --add is used │
54
+ │ --check -C Check for new plugins or new plugin signatures │
55
+ │ --help Show this message and exit. │
56
+ ╰────────────────────────────────────────────────────────────────────────────────────────────╯
57
+ ╭─ I/O options ──────────────────────────────────────────────────────────────────────────────╮
58
+ │ --input -i,-I PATH Path to the input .pyi file │
59
+ │ --output -o,-O TEXT Path to write the output .pyi file. Use '@' to overwrite the │
60
+ │ input file. │
61
+ │ [default: (vapoursynth-stubs/__init__.pyi inside the │
62
+ │ site-package folder)] │
63
+ │ --load -L PATH Load plugins from a folder or a single library file │
64
+ ╰────────────────────────────────────────────────────────────────────────────────────────────╯
65
+ ╭─ Informations ─────────────────────────────────────────────────────────────────────────────╮
66
+ │ --quiet Suppress non-error output │
67
+ │ --version -V Show version info and exit │
68
+ ╰────────────────────────────────────────────────────────────────────────────────────────────╯
69
+ ╭─ Commands ─────────────────────────────────────────────────────────────────────────────────╮
70
+ │ add Add or update the specified plugins in the stubs │
71
+ │ remove Remove the specified plugins from the stubs │
72
+ ╰────────────────────────────────────────────────────────────────────────────────────────────╯
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Examples
78
+
79
+ - Simply update the VapourSynth stubs:
80
+
81
+ ```bash
82
+ vsstubs
83
+ ```
84
+
85
+ - Generate a template stubs:
86
+
87
+ ```bash
88
+ vsstubs -o out.pyi --template
89
+ ```
90
+
91
+ - Add plugin stubs:
92
+
93
+ ```bash
94
+ vsstubs -i out.pyi -o @ add resize2
95
+ ```
96
+
97
+ - Remove plugin stubs (On Powershell you will need to escape the `@` character):
98
+
99
+ ```pwsh
100
+ vsstubs -i out.pyi -o "@" remove resize2
101
+ ```
102
+
103
+ ---
104
+
105
+ ## License
106
+
107
+ MIT
108
+
109
+ ---
110
+
111
+ ## Why use this over `vsrepo genstubs`?
112
+
113
+ - **Much faster** than `genstubs`.
114
+ - **More accurate typing**: the generated stubs better reflect the actual signatures of plugins, core classes, and functions.
115
+ - **Modern Python typing**.
116
+ - Easier to **maintain** and **extend** than `genstubs`.
117
+ - More **flexible workflow**: supports generating blank templates, checking for new plugin signatures, and selectively adding/removing plugins.
@@ -0,0 +1,99 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "vsstubs"
7
+ dynamic = ["version"]
8
+ description = "Typing stubs for VapourSynth"
9
+ readme = "README.md"
10
+ requires-python = ">=3.13"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "Vardë", email = "ichunjo.le.terrible@gmail.com" }]
13
+ keywords = ["stubs", "typing", "python"]
14
+ classifiers = [
15
+ "Development Status :: 5 - Production/Stable",
16
+ "Intended Audience :: Developers",
17
+ "Topic :: Software Development :: Libraries",
18
+ "Topic :: Software Development :: Code Generators",
19
+ "Topic :: Utilities",
20
+ "Operating System :: OS Independent",
21
+ "Typing :: Typed",
22
+ "License :: OSI Approved :: MIT License",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Programming Language :: Python :: 3.14",
26
+ ]
27
+
28
+ dependencies = ["vapoursynth>=73", "typer", "rich"]
29
+
30
+
31
+ [project.urls]
32
+ Homepage = "https://github.com/Ichunjo/vs-stubs"
33
+ Repository = "https://github.com/Ichunjo/vs-stubs"
34
+ Issues = "https://github.com/Ichunjo/vs-stubs/issues"
35
+
36
+ [project.scripts]
37
+ vsstubs = "vsstubs.cli:app"
38
+
39
+ [dependency-groups]
40
+ dev = ["mypy~=1.18.2", "ruff~=0.14.0", "twine"]
41
+
42
+ [tool.hatch.version]
43
+ path = "vsstubs/_version.py"
44
+
45
+ [tool.hatch.build.targets.wheel]
46
+ packages = ["vsstubs"]
47
+ include = ["vsstubs/_template/*.pyi", "vsstubs/py.typed"]
48
+
49
+ [tool.hatch.build.targets.sdist]
50
+ include = [
51
+ "vsstubs",
52
+ "vsstubs/_template/*.pyi",
53
+ "pyproject.toml",
54
+ "README.md",
55
+ "LICENSE",
56
+ ]
57
+
58
+ [tool.mypy]
59
+ exclude = []
60
+ # Flags changed by --strict
61
+ warn_return_any = false
62
+ extra_checks = false
63
+
64
+ # Misc
65
+ warn_unreachable = true
66
+
67
+ allow_redefinition_new = true
68
+ local_partial_types = true
69
+ implicit_reexport = false
70
+ strict = true
71
+
72
+ show_column_numbers = true
73
+ pretty = true
74
+ color_output = true
75
+ error_summary = true
76
+
77
+ [tool.ruff]
78
+ target-version = "py313"
79
+ extend-exclude = []
80
+ line-length = 120
81
+
82
+ [tool.ruff.format]
83
+ docstring-code-format = true
84
+ exclude = ["test.pyi", "test2.pyi"]
85
+
86
+ [tool.ruff.lint]
87
+ exclude = []
88
+ extend-select = ["E", "C4", "I", "PYI", "Q", "SIM", "N", "W", "RUF"]
89
+
90
+ [tool.ruff.lint.per-file-ignores]
91
+ "__init__.*" = ["F401", "F403"]
92
+ "vsstubs/_template/**.pyi" = [
93
+ "PYI002",
94
+ "PYI046",
95
+ "PYI029",
96
+ "F822",
97
+ "N801",
98
+ "N805",
99
+ ]
@@ -0,0 +1,6 @@
1
+ """Typing stubs for VapourSynth."""
2
+
3
+ from .cli import __version__
4
+ from .func import output_stubs
5
+
6
+ __all__ = ["__version__", "output_stubs"]
@@ -0,0 +1,4 @@
1
+ from .cli import app
2
+
3
+ if __name__ == "__main__":
4
+ app()
@@ -0,0 +1,68 @@
1
+ __all__ = [
2
+ "CHROMA_BOTTOM",
3
+ "CHROMA_BOTTOM_LEFT",
4
+ "CHROMA_CENTER",
5
+ "CHROMA_LEFT",
6
+ "CHROMA_TOP",
7
+ "CHROMA_TOP_LEFT",
8
+ "FIELD_BOTTOM",
9
+ "FIELD_PROGRESSIVE",
10
+ "FIELD_TOP",
11
+ "FLOAT",
12
+ "GRAY",
13
+ "GRAY8",
14
+ "GRAY9",
15
+ "GRAY10",
16
+ "GRAY12",
17
+ "GRAY14",
18
+ "GRAY16",
19
+ "GRAY32",
20
+ "GRAYH",
21
+ "GRAYS",
22
+ "INTEGER",
23
+ "NONE",
24
+ "RANGE_FULL",
25
+ "RANGE_LIMITED",
26
+ "RGB",
27
+ "RGB24",
28
+ "RGB27",
29
+ "RGB30",
30
+ "RGB36",
31
+ "RGB42",
32
+ "RGB48",
33
+ "RGBH",
34
+ "RGBS",
35
+ "YUV",
36
+ "YUV410P8",
37
+ "YUV411P8",
38
+ "YUV420P8",
39
+ "YUV420P9",
40
+ "YUV420P10",
41
+ "YUV420P12",
42
+ "YUV420P14",
43
+ "YUV420P16",
44
+ "YUV420PH",
45
+ "YUV420PS",
46
+ "YUV422P8",
47
+ "YUV422P9",
48
+ "YUV422P10",
49
+ "YUV422P12",
50
+ "YUV422P14",
51
+ "YUV422P16",
52
+ "YUV422PH",
53
+ "YUV422PS",
54
+ "YUV440P8",
55
+ "YUV444P8",
56
+ "YUV444P9",
57
+ "YUV444P10",
58
+ "YUV444P12",
59
+ "YUV444P14",
60
+ "YUV444P16",
61
+ "YUV444PH",
62
+ "YUV444PS",
63
+ "clear_output",
64
+ "clear_outputs",
65
+ "core",
66
+ "get_output",
67
+ "get_outputs",
68
+ ]