Skip to content

Commit

Permalink
chore(vscode): update settings
Browse files Browse the repository at this point in the history
chore(makefile): update
  • Loading branch information
DeadNews committed Jan 7, 2024
1 parent 796997e commit 1cec12c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
7 changes: 5 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
// List of extensions which should be recommended for users of this workspace.
"recommendations": ["ms-python.python", "charliermarsh.ruff"]
"recommendations": [
"charliermarsh.ruff",
"ms-python.mypy-type-checker",
"ms-python.python"
]
}
7 changes: 2 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
}
},
// mypy
"python.linting.mypyEnabled": true,
// pytest
"python.testing.pytestEnabled": true
}
21 changes: 12 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
poetry-install:
poetry install --sync
.PHONY: test

poetry-up:
poetry up --latest
install-all: install pc-install

install:
poetry install --sync

pre-commit-install:
pc-install:
pre-commit install

pre-commit-up:
pre-commit autoupdate
update-latest:
poetry up --latest

checks: pc-run lint

pre-commit-run:
pc-run:
pre-commit run -a

lint:
poetry run poe lint

tests:
test:
poetry run pytest
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ exclude_lines = [

[tool.mypy]
disallow_untyped_defs = true
follow_imports = "silent"
follow_imports = "normal"
ignore_missing_imports = true
show_column_numbers = true
show_error_codes = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
module = ["tests.*"]
allow_untyped_defs = true
disallow_untyped_defs = false

[tool.ruff]
line-length = 99
target-version = "py311" # until poetry v2
target-version = "py311" # Until Poetry v2

[tool.ruff.format]
line-ending = "lf"
Expand Down Expand Up @@ -110,5 +110,11 @@ allow-dict-calls-with-keyword-arguments = false
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"

[tool.ruff.pydocstyle]
convention = "google"

[tool.ruff.pycodestyle]
max-doc-length = 129

[tool.ruff.flake8-annotations]
allow-star-arg-any = true

0 comments on commit 1cec12c

Please sign in to comment.