lincc-frameworks / lincc-frameworks/python-project-template
Remove pinned python version from black precommit hook
まだ誰も着手していません。
- 主要言語
- Jinja
- スター
- 85
- フォーク
- 16
- 平均マージ
- 6時間 18分
- マージ済み PR(30日)
- 1
説明
@camposandro and I have run into this with a couple incubees.
In the precommit template (https://github.com/lincc-frameworks/python-project-template/blob/main/python-project-template/.pre-commit-config.yaml.jinja), we set up the black hook with the following (note the last line, with language_version):
{%- if 'black' in enforce_style %}
# Analyze the code style and report code that doesn't adhere.
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black-jupyter
name: Format code using black
types_or: [python, pyi, jupyter]
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python{{ py.pref(python_versions) }}
{%- endif %}
And two users have ended up with some version of language_version: 3.11, which caused errors for them.
We should either remove this line, or make it not do this kind of behavior
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
python-project-template/.pre-commit-config.yaml.jinja から始め、py.pref(python_versions) が hook の language_version をどのように生成するかを確認します。リンクされている pre-commit language-version のガイダンスを確認したうえで、生成された設定が失敗する固定 Python バージョンを強制しないようにテンプレートを調整し、影響を受けるプロジェクトの結果の設定を検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100