Skip to content

Rename underscore-prefixed binding factory functions to make_something - #1384

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
naming
Apr 27, 2026
Merged

Rename underscore-prefixed binding factory functions to make_something#1384
meta-codesync[bot] merged 1 commit into
mainfrom
naming

Conversation

@mthrok

@mthrok mthrok commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

The stub generator skips symbols prefixed with underscores, so factory functions like _demuxer, _make_bsf, _make_decoder, and _nvdec_decoder were missing from the generated .pyi stub files.

This made it difficult for type checkers and tooling to understand the codebase.

Renamed the bindings as follows:

  • _demuxer -> make_demuxer (demuxing.cpp, 2 overloads)
  • _make_bsf -> make_bsf (bsf.cpp, 3 overloads)
  • _make_decoder -> make_decoder (decoding.cpp, 3 overloads)
  • _nvdec_decoder -> make_nvdec_decoder (decoding_nvdec.cpp)

Updated all call sites in _core.py and regenerated stub files.

The stub generator skips symbols prefixed with underscores, so
factory functions like `_demuxer`, `_make_bsf`, `_make_decoder`, and
`_nvdec_decoder` were missing from the generated `.pyi` stub files.

This made it difficult for type checkers and tooling to understand the codebase.

Renamed the bindings as follows:
- `_demuxer` -> `make_demuxer` (demuxing.cpp, 2 overloads)
- `_make_bsf` -> `make_bsf` (bsf.cpp, 3 overloads)
- `_make_decoder` -> `make_decoder` (decoding.cpp, 3 overloads)
- `_nvdec_decoder` -> `make_nvdec_decoder` (decoding_nvdec.cpp)

Updated all call sites in `_core.py` and regenerated stub files.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 27, 2026
@meta-codesync

meta-codesync Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D102682526. (Because this pull request was imported automatically, there will not be any future comments.)

@mthrok
mthrok marked this pull request as ready for review April 27, 2026 22:20
@meta-codesync
meta-codesync Bot merged commit a3d60c1 into main Apr 27, 2026
112 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant