Repository navigation
fix(quantization): use raw docstrings for '\*' escapes - #143
Open
alphasafal wants to merge 5 commits into
Open
alphasafal wants to merge 5 commits into
alphasafal wants to merge 5 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
OpQuantizerConfigandModuleQuantizerConfigdocstrings escape*as\*so Sphinx doesn't treat it as emphasis. In a normal string literal that's an invalid escape sequence, so on Python 3.12+ compilingquantization_config.pyprintsand with
python -W error(or a pytest config that turns warnings into errors) the module doesn't compile at all. I ran into it right after installing on 3.13.Changes
rprefix on four regex literals intest_annotation_pattern_registry.pythat had\./\*.W605somake checkcatches new ones. On main it flags exactly these 20 spots.tests/test_source_compiles.py, which compiles every module undercoreai_optwith warnings as errors. It fails on main and passes with this change.Fixed.Testing
pre-commit run --all-filespasses.pytest -m "not slow"on Python 3.13 / Linux: everything passes apart from export and nox tests that need coremltools, pyreporoot and model downloads I couldn't install in my environment. None of those touch the files changed here.