Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a719ee1

Browse files
tensorflower-gardenercopybara-github
authored andcommitted
Expose where the issue was found when the linter finds an issue.
PiperOrigin-RevId: 728556611
1 parent 0c634f4 commit a719ee1

File tree

1 file changed

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

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ 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(
69+
f"Use inclusive language where possible and accurate. Found: {words} in"
70+
f" {args['cell_source']}"
71+
)
6972
else:
7073
return True
7174

@@ -82,6 +85,9 @@ def second_person(args):
8285
found_words = search_wordlist(_SECOND_PERSON_WORDLIST, args["cell_source"])
8386
if found_words:
8487
words = ", ".join([f"{word} => {alt}" for word, alt in found_words.items()])
85-
fail(f"Prefer second person instead of first person. Found: {words}")
88+
fail(
89+
f"Prefer second person instead of first person. Found: {words} in"
90+
f" {args['cell_source']}"
91+
)
8692
else:
8793
return True

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /