From 159137f28839bbedbc3b4fc216713ea165997263 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Mon, 30 Sep 2024 00:44:53 -0600 Subject: [PATCH] Add vscode editor config --- .vscode/settings.json | 7 +++++++ .vscode/tasks.json | 26 ++++++++++++++++++++++++++ pyproject.toml | 5 +++++ 3 files changed, 38 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a3a1838 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "python.testing.pytestArgs": [ + "tests" + ], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..f91477a --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,26 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Run tests", + "type": "shell", + "group": { + "kind": "test", + "isDefault": true + }, + "command": "hatch test -a" + }, + { + "label": "Lint/Format", + "type": "shell", + "command": "hatch fmt" + }, + { + "label": "REPL", + "type": "shell", + "command": "hatch run repl:ptpython" + } + ] +} diff --git a/pyproject.toml b/pyproject.toml index b5c388a..dc1cfab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,5 +95,10 @@ dependencies = [ [tool.hatch.envs.speedtest.scripts] run = "./speedtest.py" +[tool.hatch.envs.repl] +extra-dependencies = [ + "ptpython" +] + [tool.ruff.lint.extend-per-file-ignores] "tests/*" = ["INP001", "SLF001"]