Commit graph

16 commits

Author SHA1 Message Date
Paul Gauthier
9210e12316 copy 2025-03-31 14:13:54 +13:00
Paul Gauthier (aider)
2c47a79c38 ci: Skip languages.md in codespell check 2025-03-31 14:13:12 +13:00
Paul Gauthier (aider)
e3e6437dca chore: configure codespell to use pyproject.toml and skip specific files 2024-09-10 13:37:18 -07:00
Paul Gauthier (aider)
c575bae710 feat: add codespell as pre-commit hook 2024-09-10 13:33:27 -07:00
Paul Gauthier
6c38306eab Automatically install the new aider version 2024-07-13 07:47:07 +01:00
John-Mason P. Shackelford
249109ba9a
All AIDER_* environment vars may now be placed within .env 2024-06-18 11:57:52 -04:00
Paul Gauthier
5d4fd15a21 do isort first 2023-05-30 13:55:28 -07:00
Paul Gauthier
92cd2f3ce6 isort 2023-05-28 22:47:38 -07:00
Paul Gauthier
95be55a2b6 aider: Updated isort package to version 5.11.1 in .pre-commit-config.yaml.
# Context:
USER: I ran this command:

 pre-commit run --all-files

And got this output:

[INFO] Installing environment for https://github.com/pycqa/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/Users/gauthier/.cache/pre-commit/repothul7kft/py_env-python3/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
    Processing /Users/gauthier/.cache/pre-commit/repothul7kft
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'error'
stderr:
      error: subprocess-exited-with-error

      × Preparing metadata (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [17 lines of output]
          Traceback (most recent call last):
            File "/Users/gauthier/.cache/pre-commit/repothul7kft/py_env-python3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
              main()
            File "/Users/gauthier/.cache/pre-commit/repothul7kft/py_env-python3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
              json_out['return_val'] = hook(**hook_input['kwargs'])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/Users/gauthier/.cache/pre-commit/repothul7kft/py_env-python3/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
              return hook(metadata_directory, config_settings)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/private/var/folders/49/kxrdwwbx0h9bchx99397477c0000gn/T/pip-build-env-sqwnl1t6/overlay/lib/python3.11/site-packages/poetry/core/masonry/api.py", line 41, in prepare_metadata_for_build_wheel
              poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/private/var/folders/49/kxrdwwbx0h9bchx99397477c0000gn/T/pip-build-env-sqwnl1t6/overlay/lib/python3.11/site-packages/poetry/core/factory.py", line 58, in create_poetry
              raise RuntimeError("The Poetry configuration is invalid:\n" + message)
          RuntimeError: The Poetry configuration is invalid:
            - [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'

          [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed

    × Encountered error while generating package metadata.
    ╰─> See above for output.

    note: This is an issue with the package mentioned above, not pip.
    hint: See above for details.
Check the log at /Users/gauthier/.cache/pre-commit/pre-commit.log

ASSISTANT: It seems like there is an issue with the `isort` package configuration in the `.pre-commit-config.yaml` file. The error message indicates that the `pip-shims<=0.3.4` does not match the expected pattern `^[a-zA-Z-_.0-9]+$`.

To fix this issue, you can try updating the `isort` package to the latest version. Modify the `.pre-commit-config.yaml` file as follows:

```yaml
.pre-commit-config.yaml
<<<<<<< ORIGINAL
  - repo: https://github.com/pycqa/isort
    rev: 5.10.1
    hooks:
      - id: isort
        args: ["--profile", "black"]
=======
  - repo: https://github.com/pycqa/isort
    rev: 5.11.1
    hooks:
      - id: isort
        args: ["--profile", "black"]
>>>>>>> UPDATED
```

After updating the `isort` version, try running the `pre-commit run --all-files` command again.
2023-05-28 22:46:02 -07:00
Paul Gauthier
4811bc91c2 aider: Added isort to the pre-commit configuration with the "black" profile.
# Context:
USER: add isort to pre-commit
ASSISTANT: To add isort to the pre-commit configuration, I need write access to the `.pre-commit-config.yaml` file. Please make it *read-write* and let me know.
USER: I added these *read-write* files: .pre-commit-config.yaml
ASSISTANT: Great! Now I will add isort to the `.pre-commit-config.yaml` file.

```yaml
.pre-commit-config.yaml
<<<<<<< ORIGINAL
repos:
  - repo: https://github.com/psf/black
    rev: 23.3.0
    hooks:
      - id: black
        args: ["--line-length", "100", "--preview"]
  - repo: https://github.com/pycqa/flake8
    rev: 6.0.0
    hooks:
      - id: flake8
        args: ["--show-source"]
=======
repos:
  - repo: https://github.com/psf/black
    rev: 23.3.0
    hooks:
      - id: black
        args: ["--line-length", "100", "--preview"]
  - repo: https://github.com/pycqa/flake8
    rev: 6.0.0
    hooks:
      - id: flake8
        args: ["--show-source"]
  - repo: https://github.com/pycqa/isort
    rev: 5.10.1
    hooks:
      - id: isort
        args: ["--profile", "black"]
>>>>>>> UPDATED
```

I've added isort to the pre-commit configuration with the "black" profile to ensure compatibility with the existing black formatter.
2023-05-28 22:43:37 -07:00
Paul Gauthier
3c26f90269 aider: Added --show-source argument to flake8 hook in .pre-commit-config.yaml.
# Context:
USER: can we make flake8 output the actual lines that have each error?
ASSISTANT: Yes, we can modify the `.pre-commit-config.yaml` file to include the `--show-source` argument for flake8. This will show the source code lines that have errors.

Here's the change:

```yaml
.pre-commit-config.yaml
<<<<<<< ORIGINAL
  - repo: https://github.com/pycqa/flake8
    rev: 6.0.0
    hooks:
      - id: flake8
=======
  - repo: https://github.com/pycqa/flake8
    rev: 6.0.0
    hooks:
      - id: flake8
        args: ["--show-source"]
>>>>>>> UPDATED
```
2023-05-17 17:55:40 -07:00
Paul Gauthier
84776593d3 black config 2023-05-10 21:35:10 -07:00
Paul Gauthier
36fe08ae13 fixed regex; black config 2023-05-10 21:32:23 -07:00
Paul Gauthier
e2b5c6074f lint 2023-05-09 13:10:38 -07:00
Paul Gauthier
1d0d3c700e added flake8 2023-05-07 22:13:57 -07:00
Paul Gauthier
3c98410d62 init 2023-05-07 22:04:54 -07:00