Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Filter out non-Python source files

オープン
#3,848 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
cli

調査の方向性

Start by tracing how the command selects files and applies skip; the issue does not name specific files or tests. Check how a global *.py restriction should interact with explicitly passed Python files and skip. Done means the option checks only Python files while preserving both behaviors.

索引モデルが issue の本文から書いたものです。

説明

I utilize CodeSpell to enforce US spelling as part of an internal Python coding standard. Most of the code bases it checks live inside mono repos where there'll be a lot of CPP source files and configuration. When I invoke CodeSpell it will find issues across all files, but I would like the ability for it to only check Python files.

What I've tried

Filtering out patterns using skip - not really practical since it expects me to know which files might exist in a repo ahead of time. I did notice that CodeSpell uses fnmatch under the hood which claims to support negative matches using !, but I wasn't able get this to work for matching non *.py patterns.

Passing a list of Python files - messy since I need to do a glob first and then filter out the Python files I want to skip (tests, files under .venv etc.)

What I would like to see

A global option to restrict checks to *.py files. It would respect both skip and any Python files I pass to the command.


Any pointers on how this could be achieved currently would be welcome! If it's not I would be open to pushing a PR if an approach could be agreed on.

主要言語
Python
スター
2.4k
フォーク
531
平均マージ
15時間 5分
マージ済み PR(30日)
18

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codespell-project/codespell のほかの issue

codespell-project/codespell の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。