-
Notifications
You must be signed in to change notification settings - Fork 2k
Clarify TODOs in is_hidden docstring #6327
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
base: master
Are you sure you want to change the base?
Clarify TODOs in is_hidden docstring #6327
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the docstring of the is_hidden function by documenting current implementation details that correspond to existing TODOs in the code.
Changes:
- Added a note to the
is_hiddenfunction docstring explaining that platform-specific checks are performed on each invocation and that bytes inputs are supported for backward compatibility
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Determine whether the given path is treated as a 'hidden file' by the OS. | ||
|
|
||
| Note: A platform-specific check is performed on each invocation. Bytes | ||
| inputs are supported for backward compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be slow here but what did you intend to clarify? Lines 25-27 tell exactly the same already. Maybe I'm missing something, please elaborate your idea here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the look happy to elaborate the intention here was not to provide any new information, rather to declare the meaning of TODOs that already exists in the docstring.
currently the docstring is an explanation of what the function does, but the TODOs are clues to a couple details that might not be obvious behind this operation:
that a platform-dependent check is performed on each call, and since bytes inputs still have support largely for backwards compatibility.
This note seemed like an attempt to bring that detail out for readers without having them know to go find or understand the TODO comments.
If this does feel a bit redundant or not useful I will drop the changes.
This PR clarifies existing TODOs by documenting known limitations in the
is_hidden() docstring. No behavior is changed.