Skip to content

docs: quote extras specifiers in install commands - #482

Open
MishkaSimakov wants to merge 1 commit into
google-research:masterfrom
MishkaSimakov:quote-pip-extras
Open

docs: quote extras specifiers in install commands#482
MishkaSimakov wants to merge 1 commit into
google-research:masterfrom
MishkaSimakov:quote-pip-extras

Conversation

@MishkaSimakov

Copy link
Copy Markdown

The install commands in README.md and three files under timesfm-forecasting/ fail in zsh, which is the default shell on macOS.

zsh treats [...] as a glob character class and, unlike bash, errors when a pattern matches nothing:

$ pip install timesfm[torch]
zsh: no matches found: timesfm[torch]

Worse, when the pattern does match a file, zsh silently rewrites the argument instead of failing:

$ touch timesfmt
$ pip install timesfm[torch]     # -> pip tries to install timesfmt

Wrapping the specifier in double quotes fixes it, and works in sh, bash, zsh, fish and PowerShell.

The repo already does this in .github/workflows/main.yml:25.

Left v1/ untouched since it's archived.

@google-cla

google-cla Bot commented Sep 2, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

In zsh, `[...]` is a glob character class and NOMATCH is on by default,
so unquoted extras fail outright:

    $ uv pip install -e .[torch]
    zsh: no matches found: .[torch]

Worse, if a file happens to match the pattern, zsh silently rewrites the
argument instead of erroring -- e.g. with a file named `timesfmt` present,
`pip install timesfm[torch]` becomes `pip install timesfmt`.

Double quotes are the portable form (sh, bash, zsh, fish, cmd, PowerShell)
and match what the project already does in .github/workflows/main.yml and
in timesfm-forecasting/examples/global-temperature/README.md.
@MishkaSimakov

Copy link
Copy Markdown
Author

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

CLA is signed and verified. I await your review.

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.

1 participant