Skip to content

Commit d5443c9

Browse files
committed
clean up
1 parent 19d47ce commit d5443c9

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

tooling/src/hypothesistooling/__main__.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import sys
1616
from datetime import date
1717
from pathlib import Path
18+
from textwrap import indent
1819

1920
import requests
2021
from 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("\nDuplicate word(s) found:")
108-
print(indent(dupes, " "))
104+
if matches:
105+
print("\nFound duplicate words:")
106+
print(indent(matches, " "))
109107
failed = True
110108

111109
if failed:

0 commit comments

Comments
 (0)