Skip to content

gh-132971: update shutil.which doc #133067

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

985025074
Copy link

@985025074 985025074 commented Apr 28, 2025

Hello! This is my first contribution to Python. If there’s anything incorrect, please forgive me.


📚 Documentation preview 📚: https://cpython-previews--133067.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-bot bot commented Apr 28, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Apr 28, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Apr 28, 2025
@picnixz picnixz changed the title gh-132971:update shutil.which doc gh-132971: update shutil.which doc Apr 28, 2025
@picnixz picnixz changed the title gh-132971: update shutil.which doc gh-132971: update shutil.which doc Apr 28, 2025
Comment on lines 448 to 449
If *cmd* contains a directory component, *which* will only check the specified path directly
and will not search the directories listed in *path* or in the system's ``PATH`` environment variable.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If *cmd* contains a directory component, *which* will only check the specified path directly
and will not search the directories listed in *path* or in the system's ``PATH`` environment variable.
If *cmd* contains a directory component, :func:`!which` only checks the
specified path directly and does not search the directories listed in *path*
or in the system's ``PATH`` environment variable.

Can we put this one after path is being documented? and make it under a .. note:: directive please? TiA.

Copy link
Author

Choose a reason for hiding this comment

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

I have done it in the latest commit.


If *cmd* contains a directory component, :func:`!which` only checks the
specified path directly and does not search the directories listed in *path*
or in the system's ``PATH`` environment variable.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
or in the system's ``PATH`` environment variable.
or in the system's :envvar:`PATH` environment variable.

Why not use a directive?

Copy link
Member

Choose a reason for hiding this comment

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

Are we documenting it somewhere?

Copy link
Author

Choose a reason for hiding this comment

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

I have corrected it.Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

4 participants