INNER CODE UNIT · Python
expected
YutaSugimura/DeFi-Map · scripts/check_format.py:112
expected = total // 10 * 10
if int(taglines[0].group("total")) != expected:
err(f"README.md: tagline says {taglines[0].group('total')}+ protocols; should be {expected}+ (actual total {total})")
if int(taglines[0].group("chains")) != len(chain_rows):
err(f"README.md: tagline says {taglines[0].group('chains')} networks; chain table has {len(chain_rows)}")
if errors:
print(f"FAILED — {len(errors)} problem(s):")
for e in errors:
print(f" - {e}")
return 1
print(f"OK — {len(chain_rows)} chains, {total} protocols, all format checks passed")
return 0
if __name__ == "__main__":
sys.exit(main())