RagnarGrootKoerkamp / BAPCtools

Tools for developing ICPC-style programming contest problems.
GNU General Public License v3.0
48 stars 18 forks source link

generate.py: avoid involuntary substring search #381

Closed paul-wild closed 2 months ago

paul-wild commented 2 months ago

This fixes a bug that occurs when a generator invocation contains the substring "count", for instance if a generator is called counts.py.

mzuenni commented 2 months ago

The style checkers wants some linebreaks:

if (
    not isinstance(yaml, dict)
    or 'count' not in yaml
    or not isinstance(yaml['count'], int)
):