yegor256/gitted

Makefile `PYS` wildcard misses every Python source under `src/gitted/`

Open

#135 opened on 2026年6月21日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Shell (5 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (12 stars)
PR merge metrics
 (PR metrics pending)

説明

Makefile line 9 sets PYS = $(wildcard src/**.py), but make's wildcard function treats ** as two ordinary * globs, not as a recursive globstar. With the actual layout the sources live under src/gitted/__init__.py and src/gitted/diff2msg.py, and no Python file sits directly in src/, so the pattern matches nothing and PYS expands to an empty list.

A minimal repro is make -p | grep '^PYS ', which prints PYS = (empty). Every prerequisite list that depends on PYSruff: $(PYS), flake8: $(PYS), mypy: $(PYS), pytest: $(PYS), test: $(RESULTS) $(PYS) — therefore drops its Python-source dependency. The targets still fire because they are listed under .PHONY, but the Makefile no longer encodes the relationship between the lint/type/test rules and the files they actually consume, and any future non-phony rule keyed on $(PYS) would silently do nothing.

The fix is to point the wildcard at the real location of the sources, e.g. PYS = $(wildcard src/gitted/*.py) (or, if other subpackages are expected later, drop to a shell find invocation), so the variable expands to the two .py files that actually exist and the prerequisite lists once again match reality.

コントリビューターガイド