From becc645b53fa30853c45509bbf9a8df9e56e814a Mon Sep 17 00:00:00 2001 From: Matt Craig Date: Sun, 11 Aug 2024 18:36:05 -0500 Subject: [PATCH] Add black as a test requirement and set up rules exclude extern files from black --- pyproject.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 3e93aaf6..1fd50086 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ docs = [ "sphinx-astropy", ] test = [ + "black", "memory_profiler", "pytest-astropy>=0.10.0", ] @@ -48,6 +49,19 @@ include = [ "/ccdproc", ] +[tool.black] +line-length = 88 +target-version = ['py310', 'py311'] +include = '\.pyi?$|\.ipynb$' +# 'extend-exclude' excludes files or directories in addition to the defaults +extend-exclude = ''' +# A regex preceded with ^/ will apply only to files and directories +# in the root of the project. +( + ^/ccdproc/extern +) +''' + [tool.coverage] [tool.coverage.run] source = ["ccdproc"]