From 65fa102fa6cf97ca165454129e68721d4de92b35 Mon Sep 17 00:00:00 2001
From: Maximilian Moser <maximilian.moser@tuwien.ac.at>
Date: Wed, 9 Nov 2022 16:48:16 +0100
Subject: [PATCH] Use black as code formatter

---
 .editorconfig          |  9 ---------
 .git-blame-ignore-revs |  0
 MANIFEST.in            |  1 +
 docs/conf.py           |  4 ++--
 pytest.ini             | 11 -----------
 setup.cfg              | 11 +++++------
 6 files changed, 8 insertions(+), 28 deletions(-)
 create mode 100644 .git-blame-ignore-revs
 delete mode 100644 pytest.ini

diff --git a/.editorconfig b/.editorconfig
index bcac89e..c073704 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -15,15 +15,6 @@ insert_final_newline = true
 trim_trailing_whitespace = true
 charset = utf-8
 
-# Python files
-[*.py]
-indent_size = 4
-# isort plugin configuration
-known_first_party = invenio_utilities_tuw
-multi_line_output = 2
-default_section = THIRDPARTY
-skip = .eggs
-
 # RST files (used by sphinx)
 [*.rst]
 indent_size = 4
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 0000000..e69de29
diff --git a/MANIFEST.in b/MANIFEST.in
index ac43375..6bd34b2 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -18,6 +18,7 @@
 exclude .gitlab-ci.yml
 exclude sonar-project.properties
 
+include .git-blame-ignore-revs
 include .dockerignore
 include .editorconfig
 include .tx/config
diff --git a/docs/conf.py b/docs/conf.py
index f0499db..8dc911e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -8,10 +8,10 @@
 
 """Sphinx configuration."""
 
-from invenio_utilities_tuw import __version__
-
 import sphinx.environment
 
+from invenio_utilities_tuw import __version__
+
 # -- General configuration ------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
diff --git a/pytest.ini b/pytest.ini
deleted file mode 100644
index 97614cf..0000000
--- a/pytest.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2020 - 2021 TU Wien.
-#
-# Invenio-Utilities-TUW is free software; you can redistribute it and/or
-# modify it under the terms of the MIT License; see LICENSE file for more
-# details.
-
-[pytest]
-addopts = --isort --pydocstyle --pycodestyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_utilities_tuw --cov-report=term-missing
-testpaths = docs tests invenio_utilities_tuw
diff --git a/setup.cfg b/setup.cfg
index 98a5503..4c48f55 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -39,6 +39,7 @@ install_requires =
 
 [options.extras_require]
 tests =
+    pytest-black>=0.3.0,<0.3.10
     pytest-invenio>=1.4.0
     Sphinx>=4.2.0
 # Kept for backwards compatibility
@@ -90,10 +91,8 @@ max-line-length = 88
 extend-ignore = E203,E731
 
 [isort]
-multi_line_output = 3
-include_trailing_comma = True
-force_grid_wrap = 0
-use_parentheses = True
-ensure_newline_before_comments = True
-line_length = 88
+profile=black
 
+[tool:pytest]
+addopts = --black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_utilities_tuw --cov-report=term-missing
+testpaths = docs tests invenio_utilities_tuw
-- 
GitLab