From 6ff76bbec333aaeb916d87a72498e3b8fa117812 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Mon, 22 Aug 2022 18:42:11 +0200 Subject: [PATCH] Core: configure pre-commit and run it on all files --- .pre-commit-config.yaml | 19 +++++++++++++++++++ clean_rst/__init__.py | 2 +- tests/test_clean_rst.py | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c803c21 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: check-toml + - id: check-yaml + - id: end-of-file-fixer + - id: mixed-line-ending + - repo: https://github.com/psf/black + rev: 22.3.0 + hooks: + - id: black + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 + hooks: + - id: isort + args: ["--profile", "black"] diff --git a/clean_rst/__init__.py b/clean_rst/__init__.py index b794fd4..3dc1f76 100644 --- a/clean_rst/__init__.py +++ b/clean_rst/__init__.py @@ -1 +1 @@ -__version__ = '0.1.0' +__version__ = "0.1.0" diff --git a/tests/test_clean_rst.py b/tests/test_clean_rst.py index a1a2586..93d8d0d 100644 --- a/tests/test_clean_rst.py +++ b/tests/test_clean_rst.py @@ -2,4 +2,4 @@ from clean_rst import __version__ def test_version(): - assert __version__ == '0.1.0' + assert __version__ == "0.1.0"