Skip to content

Commit

Permalink
Correct typos in docs and code comments (#13032)
Browse files Browse the repository at this point in the history
Also move "Selected quotes from research participants" out of a random paragraph.
  • Loading branch information
JoshuaPerdue authored Dec 7, 2024
1 parent 8dbbb2e commit a194b45
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Its main addition consists of the following function:
.. py:method:: get_default_values()
Overrides the original method to allow updating the defaults ater the instantiation of the
Overrides the original method to allow updating the defaults after the instantiation of the
option parser.

It allows overriding the default options and arguments using the ``Configuration`` class
Expand Down
2 changes: 1 addition & 1 deletion docs/html/development/architecture/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Once it has those, it selects one file and downloads it.
cannot….should not be …. ? I want only the Flask …. Why am I getting the
whole list?

Answer: It's not every file, just files of Flask. No API for getting alllllll
Answer: It's not every file, just files of Flask. No API for getting all
files on PyPI. It’s for getting all files of Flask.)

.. _`tracking issue`: https://github.com/pypa/pip/issues/6831
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ _Suggested content:_
_Page purpose:_

- To onboard people who want to contribute to pip's docs
- To share previous research and recommendataions related to pip's docs
- To share previous research and recommendations related to pip's docs

_Suggested content:_

Expand Down
2 changes: 1 addition & 1 deletion docs/html/ux-research-design/research-results/personas.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Problem

We want to develop personas for pip's user to facilate faster user-centered decision making for the pip development team.
We want to develop personas for pip's user to facilitate faster user-centered decision making for the pip development team.

[Skip to recommendations](#recommendations)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Most respondents use `--force-reinstall` "almost never" (65.6%):
![screenshot of survey question of how often users use --force-reinstall](https://i.imgur.com/fjLQUPV.png)
![bar chart of how often users use --force-reinstall](https://i.imgur.com/Xe1XDkI.png)

Amongst respondents who said they use `--force-resinstall` often or very often:
Amongst respondents who said they use `--force-reinstall` often or very often:

- 54.54% (6/11) of respondents thought that pip should install the same version of requests - i.e. that `--force-reinstall` should _not_ implicitly upgrade
- 45.45% (5/11) of respondents thought that pip should upgrade requests to the latest version - i.e that `--force-reinstall` _should_ implicitly upgrade
Expand All @@ -76,7 +76,7 @@ Respondents find `--force-reinstall` less useful than useful:
![screenshot of survey question of how useful users find --force-reinstall](https://i.imgur.com/6cv4lFn.png)
![bar chart of how useful users find --force-reinstall](https://i.imgur.com/gMUBDBo.png)

Amongst respondents who said they find `--force-resinstall` useful or very useful:
Amongst respondents who said they find `--force-reinstall` useful or very useful:

- 38.46% (20/52) of respondents thought that pip should install the same version of requests - i.e. that `--force-reinstall` should _not_ implicitly upgrade
- 50% (26/52) of respondents thought that pip should upgrade requests to the latest version - i.e that `--force-reinstall` _should_ implicitly upgrade
Expand All @@ -89,7 +89,7 @@ In this case, we recommend showing the following message when a user tries to us

> Error: the pip install --force-reinstall option no longer exists. Use pip uninstall then pip install to replace up-to-date packages, or pip install --upgrade to update your packages to the latest available versions.
Should the pip development team wish to keep `--force-resintall`, we recommend maintaining the current (implicit upgrade) behaviour, as pip's users have not expressed a clear preference for a different behaviour.
Should the pip development team wish to keep `--force-reinstall`, we recommend maintaining the current (implicit upgrade) behaviour, as pip's users have not expressed a clear preference for a different behaviour.

In this case, we recommend upgrading the [help text](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-force-reinstall) to be more explicit:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ Results varied by the amount of Python experience the user had.

![Screenshot of Install a package from wheels](https://i.imgur.com/9DMBfNL.png)

#### Install apackage from a local directory
#### Install a package from a local directory

![Screenshot of Install apackage from a local directory](https://i.imgur.com/Jp95rak.png)
![Screenshot of Install a package from a local directory](https://i.imgur.com/Jp95rak.png)

#### Control where you want your installed package to live on your computer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Both of these groups identified their "sphere of influence" and did their best t

### User thoughts about security

Selected quotes from research participants

#### Responsibility as author

Participants who spent a lot of their time writing Python code - either for community or as part of their job - expressed a responsibility to their users for the code they wrote - people who wrote code which was made public expressed a stronger responsibility.
Expand All @@ -76,8 +78,7 @@ Participants also explained they rely on code security scanning and checking sof
#### Reliance on good software development practices

A small number of participants e### Selected quotes from research participants
xplained they have good software practices in place, which help with writing secure software.
A small number of participants explained they have good software practices in place, which help with writing secure software.

> "We have a book about ethics of code - we have mandatory certification."
Expand Down
1 change: 1 addition & 0 deletions news/13031.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Correct documentation errors.
2 changes: 1 addition & 1 deletion src/pip/_internal/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def iter_config_files(self) -> Iterable[Tuple[Kind, List[str]]]:
This should be treated like items of a dictionary. The order
here doesn't affect what gets overridden. That is controlled
by OVERRIDE_ORDER. However this does control the order they are
displayed to the user. It's probably most ergononmic to display
displayed to the user. It's probably most ergonomic to display
things in the same order as OVERRIDE_ORDER
"""
# SMELL: Move the conditions out of this function
Expand Down
4 changes: 2 additions & 2 deletions src/pip/_internal/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _should_use_importlib_metadata() -> bool:
"""Whether to use the ``importlib.metadata`` or ``pkg_resources`` backend.
By default, pip uses ``importlib.metadata`` on Python 3.11+, and
``pkg_resourcess`` otherwise. This can be overridden by a couple of ways:
``pkg_resources`` otherwise. This can be overridden by a couple of ways:
* If environment variable ``_PIP_USE_IMPORTLIB_METADATA`` is set, it
dictates whether ``importlib.metadata`` is used, regardless of Python
Expand Down Expand Up @@ -71,7 +71,7 @@ def get_default_environment() -> BaseEnvironment:
This returns an Environment instance from the chosen backend. The default
Environment instance should be built from ``sys.path`` and may use caching
to share instance state accorss calls.
to share instance state across calls.
"""
return select_backend().Environment.default()

Expand Down
2 changes: 1 addition & 1 deletion src/pip/_internal/metadata/importlib/_dists.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def read_text(self, path: InfoPath) -> str:
return content

def iter_entry_points(self) -> Iterable[BaseEntryPoint]:
# importlib.metadata's EntryPoint structure sasitfies BaseEntryPoint.
# importlib.metadata's EntryPoint structure satisfies BaseEntryPoint.
return self._dist.entry_points

def _metadata_impl(self) -> email.message.Message:
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_internal/pyproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def load_pyproject_toml(
build_system = None

# The following cases must use PEP 517
# We check for use_pep517 being non-None and falsey because that means
# We check for use_pep517 being non-None and falsy because that means
# the user explicitly requested --no-use-pep517. The value 0 as
# opposed to False can occur when the value is provided via an
# environment variable or config file option (due to the quirk of
Expand Down

0 comments on commit a194b45

Please sign in to comment.