[ty] Use "cannot" consistently over "can not" (#21255)

This commit is contained in:
Alex Waygood 2025-11-03 10:38:20 -05:00 committed by GitHub
parent e8c35b9704
commit 39f105bc4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 39 additions and 39 deletions

View File

@ -32,8 +32,8 @@ static_assert(not is_singleton(Literal[1]))
static_assert(not is_singleton(Literal[54165])) static_assert(not is_singleton(Literal[54165]))
``` ```
This has implications for type-narrowing. For example, you can not use the `is not` operator to This has implications for type-narrowing. For example, you cannot use the `is not` operator to check
check whether a variable has a specific integer literal type, but this is not a recommended practice whether a variable has a specific integer literal type, but this is not a recommended practice
anyway. anyway.
```py ```py

View File

@ -187,8 +187,8 @@ python-platform = "all"
If `python-platform` is set to `all`, we treat the platform as unspecified. This means that we do If `python-platform` is set to `all`, we treat the platform as unspecified. This means that we do
not infer a literal type like `Literal["win32"]` for `sys.platform`, but instead fall back to not infer a literal type like `Literal["win32"]` for `sys.platform`, but instead fall back to
`LiteralString` (the `typeshed` annotation for `sys.platform`). This means that we can not `LiteralString` (the `typeshed` annotation for `sys.platform`). This means that we cannot statically
statically determine the truthiness of a branch like `sys.platform == "win32"`. determine the truthiness of a branch like `sys.platform == "win32"`.
See <https://github.com/astral-sh/ruff/issues/16983#issuecomment-2777146188> for a plan on how this See <https://github.com/astral-sh/ruff/issues/16983#issuecomment-2777146188> for a plan on how this
could be improved. could be improved.