bootstrap/specs/poetry/template
Joshua Potter 720f15ffc0 Anchor filetype extension in pre-commits. 2023-12-13 12:05:51 -07:00
..
.githooks Anchor filetype extension in pre-commits. 2023-12-13 12:05:51 -07:00
app
.envrc
.gitignore
README.md Add pyls-isort. 2023-12-01 16:03:37 -07:00
default.nix
flake.lock
flake.nix Add pyls-isort. 2023-12-01 16:03:37 -07:00
poetry.lock
pyproject.toml

README.md

Poetry Flake Template

This is a template for constructing a working environment for Python (version 3.11.6) development. Packaging and dependency management relies on poetry (version 1.7.0). direnv can be used to a launch a dev shell upon entering this directory (refer to .envrc). Otherwise run via:

$ nix develop

Language Server

The python-lsp-server (version v1.9.0) is included in this flake, along with the python-lsp-black and pyls-isort plugins. Additionally, pylsp is expected to be configured to use:

Refer to your editor for configuration details.

Formatting

Formatting depends on the black (version 23.9.1) tool. A pre-commit hook is included in .githooks that can be used to format all *.py files prior to commit. Install via:

$ git config --local core.hooksPath .githooks/

If running direnv, this hook is installed automatically when entering the directory.