https://github.com/zzstoatzz/lintem
https://github.com/zzstoatzz/lintem
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zzstoatzz/lintem
- Owner: zzstoatzz
- Created: 2024-12-12T05:36:30.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-12T05:38:14.000Z (6 months ago)
- Last Synced: 2025-03-25T19:12:31.305Z (2 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## lintem
use `pydantic_ai` to fix `ruff` lint errors.
```python
ยป cat src/lintem/bad.py
make_ruff_mad = lambda x: x + 1ยป uv run lintem
""""
Checking src/lintem/__init__.py
All checks passed!
๐
Checking src/lintem/agent.py
All checks passed!
๐
Checking src/lintem/main.py
All checks passed!
๐
Checking src/lintem/bad.py
src/lintem/bad.py:1:1: E731 Do not assign a `lambda` expression, use a `def`
|
1 | make_ruff_mad = lambda x: x + 1
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E731
|
= help: Rewrite `make_ruff_mad` as a `def`Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
๐จ
Fixed src/lintem/bad.py: The file has been successfully rewritten with the following content:def make_ruff_mad(x):
return x + 1The `lambda` expression has been replaced with a regular function definition as per PEP8 guidelines.
"""ยป cat src/lintem/bad.py
def make_ruff_mad(x):
return x + 1%ยป uv run reset.py # go again!
```