-
### Describe the bug
pre-commit is failing with the following error:
```
(.venv) PS C:\GitHub\toga> pre-commit run
[INFO] Installing environment for https://github.com/asottile/pyupgrade.
[…
-
**Suggestions**
- [ ] Wait on #22 (to avoid merge conflicts)
- [x] ~~Add [pre-commit.ci](https://pre-commit.ci/) to repo~~ Pre-commit is already in the `push.yml` GHA workflow
- **Pros:** Pre c…
-
There's a new check in pyupgrade to rewrite using PEP 696 TypeVar defaults:
* https://github.com/asottile/pyupgrade#pep-696-typevar-defaults
* https://github.com/asottile/pyupgrade/pull/948
…
-
I'm using this pre-commit config:
```
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
hooks:
- id: nbqa-pyupgrade
args: ["--py310-plus"]
```
and get a failed hook…
-
Initially, we want to understand which linter is doing what. One way to do this is to comment out all the linters in `.pre-commit-config.yaml` except the one you want to focus on. That's not the best …
-
Keywords: forward reference, pyupgrade, UP007
Python 3.12, also 3.10
Ruff 0.6.1, also 0.5.7
Command: `ruff check .`
Code:
Python file
```py
x: Optional['Something'] # expect UP007 to tri…
-
I noticed that the pyupgrade fixes result in different output to pyupgrade itself. Namely, it doesn't apply replace the use of `dict()` and `set()` with the equivalent literals.
```
x = dict(a…
-
Make use of https://github.com/asottile/pyupgrade to further improve code, for example by converting `"{}".format(var)` strings to `f{var}` strings. This particular example was determined to be out of…
-
* [ ] Update cookiecutters
----
https://github.com/astral-sh/ruff
To match standard-maintenance-scripts:
* F, E (default)
* W https://beta.ruff.rs/docs/configuration/#using-pyprojecttoml
…
-
I've been testing `pyupgrade --py39-plus` (Oct this year 3.8 will be EOSed) causes pytest fails
```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pydantic-settings-2.3.4-2.fc37.x8…