Skip to content

Commit

Permalink
Merge pull request #144 from geotribu/tooling/update-dev-dependencies…
Browse files Browse the repository at this point in the history
…-and-git-hooks

Outillage: MAJ les dépendances de dév, la config VS Code et les git hooks
  • Loading branch information
Guts authored Jan 11, 2024
2 parents 5d40bfc + 475691c commit 5642f75
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 41 deletions.
30 changes: 16 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,25 @@ repos:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.1.11"
hooks:
- id: ruff
args: ["--fix-only", "--target-version=py39"]

- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
args: ["--target-version=py39"]

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args:
- "--py39-plus"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.9"
hooks:
- id: ruff
args: ["--fix-only"]
# Disabled until PyQt translation support f-strings
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.15.0
# hooks:
# - id: pyupgrade
# args:
# - "--py39-plus"

- repo: https://github.com/pycqa/isort
rev: 5.13.2
Expand All @@ -42,13 +44,13 @@ repos:
args: ["--profile", "black", "--filter-files"]

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
language: python
files: ^qtribu/.*\.py$
types: [python]
additional_dependencies: ["flake8-qgis<2"]
additional_dependencies: ["flake8-qgis"]
args:
[
"--config=setup.cfg",
Expand Down
54 changes: 31 additions & 23 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
{
// Editor
"editor.bracketPairColorization.enabled": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.formatOnSave": true,
"editor.guides.bracketPairs": "active",
"editor.rulers": [
88
],
"editor.wordWrapColumn": 88,
"editor.formatOnSave": true,
"files.associations": {
"./requirements/*.txt": "pip-requirements",
"metadata.txt": "ini"
"metadata.txt": "ini",
"**/*.ts": "xml",
"**/*.ui": "xml"
},
// Formatter
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--target-version=py39"
],
// Linter
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
// Python
"python.analysis.autoFormatStrings": true,
"python.analysis.typeCheckingMode": "basic",
"python.terminal.activateEnvInCurrentTerminal": true,
"python.terminal.activateEnvironment": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.rulers": [
88
],
"editor.wordWrapColumn": 88,
},
// Tests
"python.testing.pytestArgs": [],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
// Extensions
"autoDocstring.docstringFormat": "sphinx",
"autoDocstring.guessTypes": true,
"flake8.args": [
"--config=setup.cfg",
"--verbose"
],
"python.linting.pylintEnabled": false,
// Git
"git.enableCommitSigning": true,
// Extensions
"autoDocstring.docstringFormat": "sphinx"
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml"
}
}
5 changes: 2 additions & 3 deletions requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# -----------------------

black
flake8>=5
flake8-builtins>=1.5
flake8-isort>=4.0
flake8-isort>=6
flake8-qgis>=1
pre-commit>=3,<3.7
pre-commit>=3,<4
2 changes: 1 addition & 1 deletion requirements/testing.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Testing dependencies
# --------------------

pytest-cov>=2.11,<4.2
pytest-cov>=4.1
semver>=2.13,<2.14

0 comments on commit 5642f75

Please sign in to comment.