Remove pinned python version from black precommit hook
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Bắt đầu với python-project-template/.pre-commit-config.yaml.jinja và kiểm tra cách py.pref(python_versions) tạo ra language_version của hook. Xem hướng dẫn được liên kết về pre-commit language-version, sau đó điều chỉnh template để các cấu hình được tạo không áp đặt một phiên bản Python cố định gây lỗi; xác minh cấu hình thu được cho các dự án bị ảnh hưởng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
@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
- Ngôn ngữ chính
- Jinja
- Star
- 85
- Fork
- 16
- Merge trung bình
- 6 giờ 18 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lincc-frameworks/python-project-template
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
lincc-frameworks/python-project-template#600 · 1 bình luận ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
Tất cả issue của lincc-frameworks/python-project-template
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pastelsky/bundlephobia#1122 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/skills#1811 · 1 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
CachyOS/distribution#587 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
datalayer/mcp-compose#42 ·
-
[Chore] Keep one viget-block-generator skill and replicate it, instead of four tracked copies Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100