Skip to content

Commit 4e5dc63

Browse files
authored
Expose where the issue was found when the linter finds an issue. (#2355)
1 parent 857b9d4 commit 4e5dc63

File tree

1 file changed

+2
-2
lines changed
  • tools/tensorflow_docs/tools/nblint/style

1 file changed

+2
-2
lines changed

tools/tensorflow_docs/tools/nblint/style/google.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def inclusive_language(args):
6565
found_words = search_wordlist(_INCLUSIVE_WORDLIST, args["cell_source"])
6666
if found_words:
6767
words = ", ".join([f"{word} => {alt}" for word, alt in found_words.items()])
68-
fail(f"Use inclusive language where possible and accurate. Found: {words}")
68+
fail(f"Use inclusive language where possible and accurate. Found: {words} in {args['cell_source']}")
6969
else:
7070
return True
7171

@@ -82,6 +82,6 @@ def second_person(args):
8282
found_words = search_wordlist(_SECOND_PERSON_WORDLIST, args["cell_source"])
8383
if found_words:
8484
words = ", ".join([f"{word} => {alt}" for word, alt in found_words.items()])
85-
fail(f"Prefer second person instead of first person. Found: {words}")
85+
fail(f"Prefer second person instead of first person. Found: {words} in {args['cell_source']}")
8686
else:
8787
return True

0 commit comments

Comments
 (0)