File tree Expand file tree Collapse file tree
tooling/src/hypothesistooling Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515import sys
1616from datetime import date
1717from pathlib import Path
18+ from textwrap import indent
1819
1920import requests
2021from coverage .config import CoverageConfig
@@ -80,8 +81,6 @@ def lint():
8081 pip_tool ("ruff" , "check" , "." )
8182 codespell (* (p for p in tools .all_files () if not p .name .endswith ("by-domain.txt" )))
8283
83- from textwrap import indent
84-
8584 failed = False
8685
8786 matches = subprocess .run (
@@ -96,16 +95,15 @@ def lint():
9695 print (indent (matches , " " ))
9796 failed = True
9897
99- dupes = subprocess .run (
100- r"git grep -nP '\b(the|as|a|to|because)\s+\1\b'"
101- " -- ':!*.svg' ':!*.png' ':!*.jpg' ':!*.sketch'" ,
98+ matches = subprocess .run (
99+ r"git grep -nP '\b(the|as|a|to|because|user|test|about|from|only)\s+\1\b'" ,
102100 shell = True ,
103101 capture_output = True ,
104102 text = True ,
105103 ).stdout
106- if dupes :
107- print ("\n Duplicate word(s) found :" )
108- print (indent (dupes , " " ))
104+ if matches :
105+ print ("\n Found duplicate words :" )
106+ print (indent (matches , " " ))
109107 failed = True
110108
111109 if failed :
You can’t perform that action at this time.
0 commit comments