Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false-positive spellcheck failure #29190

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

Taragolis
Copy link
Contributor

Annoying error in local AWS Documentation build

breeze build-docs --package-filter apache-airflow-providers-amazon

==============================  apache-airflow-providers-amazon  ==============================
------------------------------ Error   1 ------------------------------
Sphinx spellcheck returned non-zero exit status: 2.

------------------------------ Error   2 ------------------------------
_api/airflow/providers/amazon/aws/utils/tags/index.rst:25: (wouldn)  the format here since it’s done by boto anyway, and the error wouldn’t be clearer if thrown from here.

File path: apache-airflow-providers-amazon/_api/airflow/providers/amazon/aws/utils/tags/index.rst
Incorrect Spelling: 'wouldn'
Line with Error: 'the format here since it’s done by boto anyway, and the error wouldn’t be clearer if thrown from here.'
Line Number: 25
  20 | .. py:function:: format_tags(source, *, key_label = 'Key', value_label = 'Value')
  21 | 
  22 |    If given a dictionary, formats it as an array of objects with a key and a value field to be passed to boto
  23 |    calls that expect this format.
  24 |    Else, assumes that it's already in the right format and returns it as is. We do not validate
> 25 |    the format here since it's done by boto anyway, and the error wouldn't be clearer if thrown from here.
  26 | 
  27 |    :param source: a dict from which keys and values are read
  28 |    :param key_label: optional, the label to use for keys if not "Key"
  29 |    :param value_label: optional, the label to use for values if not "Value"
  30 | 
====================================================================================================

Funnily enough there is no any error if I run

breeze build-docs --package-filter apache-airflow-providers-amazon --clean-build --spellcheck-only

#################### Running spell checking of documentation ####################

apache-airflow-providers-amazon                             : Checking spelling started
apache-airflow-providers-amazon                             : Finished spell-checking successfully
apache-airflow-providers-amazon                             : Checking spelling completed
Documentation build is successful

Still don't know is it only me or related to sphinx-contrib/spelling#126

Seems like there this not affect CI however it isn't first time when CI Build Docs not reported all spelling errors.

@Taragolis Taragolis added the type:doc-only Changelog: Doc Only label Jan 27, 2023
@boring-cyborg boring-cyborg bot added area:providers provider:amazon-aws AWS/Amazon - related issues labels Jan 27, 2023
@@ -24,7 +24,7 @@ def format_tags(source: Any, *, key_label: str = "Key", value_label: str = "Valu
If given a dictionary, formats it as an array of objects with a key and a value field to be passed to boto
calls that expect this format.
Else, assumes that it's already in the right format and returns it as is. We do not validate
the format here since it's done by boto anyway, and the error wouldn't be clearer if thrown from here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"wouldn't" seems perfectly reasonable here and is spelled correctly, so this is strange. However, "would not" works just as well, and if it makes the tests more stable then I guess why not 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried add into docs/spelling_wordlist.txt different combination: wouldn, wouldn', wouldn't but without any luck 😒

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That wouldn't (ehm!) work ... :D. I think the spelling wordlist acts on "words" only and ' is not considered as a letter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that is the reason why I replace as most easier option.

Need to try to found again why this kind of errors not detected in CI, for example this one also wasn't detected in CI, #28587

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's (ehm! 😆 ) also curious that it accepts the concatenated word it's in the same sentence but it doesn't like wouldn't 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When i tried to found the nature of this spellcheck errors I found this comment funny: sphinx-contrib/spelling#126 (comment)

@potiuk potiuk merged commit e1a14ae into apache:main Jan 27, 2023
@Taragolis Taragolis deleted the fix-false-positive-spellcheck branch January 27, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:amazon-aws AWS/Amazon - related issues type:doc-only Changelog: Doc Only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants