Skip to content

Fix inverted docstring for config write hide_sensitive option - #71623

Merged
potiuk merged 1 commit into
apache:mainfrom
ColtenOuO:fix-config-write-hide-sensitive-docstring
Aug 14, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
ColtenOuO:fix-config-write-hide-sensitive-docstring

Conversation

@ColtenOuO

Copy link
Copy Markdown
Contributor

Sumarry

AirflowConfigParser.write() documents its masking flag as
:param hide_sensitive_values: Include sensitive values in the output.

Both halves are wrong. The parameter is named hide_sensitive, and the
implementation does the opposite of what the description says:

if hide_sensitive and is_sensitive:
    value = "< hidden >"

This PR fixed the both problems of documents (The wrong name and wrong implementation description)

Just fixed documents, no any behavior be changed.

AirflowConfigParser.write() documented the flag under a name it does not have and
described it as including sensitive values, while the implementation replaces them
with "< hidden >". Anyone reading the docstring to decide whether a generated
config file is safe to share would conclude the opposite of what the code does.
@potiuk
potiuk merged commit 7553a6f into apache:main Aug 14, 2026
77 checks passed
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
…#71623)

AirflowConfigParser.write() documented the flag under a name it does not have and
described it as including sensitive values, while the implementation replaces them
with "< hidden >". Anyone reading the docstring to decide whether a generated
config file is safe to share would conclude the opposite of what the code does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants