-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Update pre-commit to fix Sphinx Lint #113015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
|
Thanks @hugovk for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Member
|
Thanks! |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Dec 12, 2023
(cherry picked from commit eafc238) Co-authored-by: Hugo van Kemenade <[email protected]>
|
GH-113017 is a backport of this pull request to the 3.12 branch. |
|
GH-113018 is a backport of this pull request to the 3.11 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Dec 12, 2023
(cherry picked from commit eafc238) Co-authored-by: Hugo van Kemenade <[email protected]>
AlexWaygood
pushed a commit
that referenced
this pull request
Dec 12, 2023
Update pre-commit to fix Sphinx Lint (GH-113015) (cherry picked from commit eafc238) Co-authored-by: Hugo van Kemenade <[email protected]>
AlexWaygood
pushed a commit
that referenced
this pull request
Dec 12, 2023
Update pre-commit to fix Sphinx Lint (GH-113015) (cherry picked from commit eafc238) Co-authored-by: Hugo van Kemenade <[email protected]>
aisk
pushed a commit
to aisk/cpython
that referenced
this pull request
Feb 11, 2024
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this pull request
Sep 2, 2024
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.
This fixes this error on pre-commit/linting:
[INFO] Initializing environment for https://github.com/astral-sh/ruff-pre-commit. [INFO] Installing environment for https://github.com/astral-sh/ruff-pre-commit. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/sphinx-contrib/sphinx-lint. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... An unexpected error has occurred: CalledProcessError: command: ('/Users/hugo/.cache/pre-commit/repouv8h8bwe/py_env-python3/bin/python', '-mpip', 'install', '.') return code: 1 stdout: Processing /Users/hugo/.cache/pre-commit/repouv8h8bwe Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'error' stderr: error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [43 lines of output] /private/var/folders/c8/hl_96fcs0hjgr29njx33x20c0000gn/T/pip-build-env-77idmup0/overlay/lib/python3.12/site-packages/setuptools_scm/git.py:163: UserWarning: "/Users/hugo/.cache/pre-commit/repouv8h8bwe" is shallow and may cause errors warnings.warn(f'"{wd.path}" is shallow and may cause errors') Traceback (most recent call last): File "/Users/hugo/.cache/pre-commit/repouv8h8bwe/py_env-python3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/Users/hugo/.cache/pre-commit/repouv8h8bwe/py_env-python3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hugo/.cache/pre-commit/repouv8h8bwe/py_env-python3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/c8/hl_96fcs0hjgr29njx33x20c0000gn/T/pip-build-env-77idmup0/overlay/lib/python3.12/site-packages/hatchling/build.py", line 58, in build_wheel return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard']))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/c8/hl_96fcs0hjgr29njx33x20c0000gn/T/pip-build-env-77idmup0/overlay/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", line 155, in build artifact = version_api[version](directory, **build_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/c8/hl_96fcs0hjgr29njx33x20c0000gn/T/pip-build-env-77idmup0/overlay/lib/python3.12/site-packages/hatchling/builders/wheel.py", line 407, in build_standard for included_file in self.recurse_included_files(): File "/private/var/folders/c8/hl_96fcs0hjgr29njx33x20c0000gn/T/pip-build-env-77idmup0/overlay/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", line 176, in recurse_included_files yield from self.recurse_selected_project_files() File "/private/var/folders/c8/hl_96fcs0hjgr29njx33x20c0000gn/T/pip-build-env-77idmup0/overlay/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", line 180, in recurse_selected_project_files if self.config.only_include: ^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/c8/hl_96fcs0hjgr29njx33x20c0000gn/T/pip-build-env-77idmup0/overlay/lib/python3.12/site-packages/hatchling/builders/config.py", line 781, in only_include only_include = only_include_config.get('only-include', self.default_only_include()) or self.packages ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/c8/hl_96fcs0hjgr29njx33x20c0000gn/T/pip-build-env-77idmup0/overlay/lib/python3.12/site-packages/hatchling/builders/wheel.py", line 235, in default_only_include return self.default_file_selection_options.only_include ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/functools.py", line 995, in __get__ val = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/c8/hl_96fcs0hjgr29njx33x20c0000gn/T/pip-build-env-77idmup0/overlay/lib/python3.12/site-packages/hatchling/builders/wheel.py", line 223, in default_file_selection_options raise ValueError(message) ValueError: Unable to determine which files to ship inside the wheel using the following heuristics: https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection At least one file selection option must be defined in the `tool.hatch.build.targets.wheel` table, see: https://hatch.pypa.io/latest/config/build/ As an example, if you intend to ship a directory named `foo` that resides within a `src` directory located at the root of your project, you can define the following: [tool.hatch.build.targets.wheel] packages = ["src/foo"] [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. Check the log at /Users/hugo/.cache/pre-commit/pre-commit.logsphinx-contrib/sphinx-lint#106