From aa6a0a3c7bd8e3e62d10f36e642966226b96b62a Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Sun, 1 May 2022 12:45:58 +0200 Subject: [PATCH 1/3] Fix black action arguments --- .../.github/workflows/lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.github_project_name}}/.github/workflows/lint.yml b/{{cookiecutter.github_project_name}}/.github/workflows/lint.yml index ef4e4ca..0e61f94 100644 --- a/{{cookiecutter.github_project_name}}/.github/workflows/lint.yml +++ b/{{cookiecutter.github_project_name}}/.github/workflows/lint.yml @@ -14,7 +14,8 @@ jobs: - uses: actions/setup-python@v2 - uses: psf/black@stable with: - args: ". --check" + options: "--check" + src: "." - name: docstrings run: | pip install flit From bf77f3688d5e654beb6e86968b289ad325d4702c Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Sun, 1 May 2022 12:53:28 +0200 Subject: [PATCH 2/3] Format code using black --- {{cookiecutter.github_project_name}}/docs/conf.py | 3 ++- .../{{cookiecutter.python_package_name}}/__init__.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.github_project_name}}/docs/conf.py b/{{cookiecutter.github_project_name}}/docs/conf.py index 318604f..62fdb6e 100644 --- a/{{cookiecutter.github_project_name}}/docs/conf.py +++ b/{{cookiecutter.github_project_name}}/docs/conf.py @@ -12,6 +12,7 @@ # import os import sys + sys.path.insert(0, os.path.abspath('../{{ cookiecutter.python_package_name }}')) @@ -37,7 +38,7 @@ "numpydoc", 'sphinx.ext.autodoc', 'sphinx.ext.inheritance_diagram', - 'autoapi.sphinx' + 'autoapi.sphinx', ] sphinx_gallery_conf = { diff --git a/{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/__init__.py b/{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/__init__.py index 09af2ae..e0554ae 100644 --- a/{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/__init__.py +++ b/{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/__init__.py @@ -4,9 +4,8 @@ # Copyright (c) {{ cookiecutter.author_name }}. # Distributed under the terms of the Modified BSD License. -# Must import __version__ first to avoid errors importing this file during the build process. +# Must import __version__ first to avoid errors importing this file during the build process. # See https://github.com/pypa/setuptools/issues/1724#issuecomment-627241822 from ._version import __version__ from .example import example_function - From 7414e52cc53c6ffd347e5511b24b49e5154612cb Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Sun, 1 May 2022 12:57:35 +0200 Subject: [PATCH 3/3] Doc formatting fix --- .../{{cookiecutter.python_package_name}}/example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/example.py b/{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/example.py index 8e5ca93..8bc14a2 100644 --- a/{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/example.py +++ b/{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/example.py @@ -25,7 +25,7 @@ def example_function(ax, data, above_color="r", below_color="k", **kwargs): The color of points with `y>0` below_color : color-like, default: 'k' The color of points with `y<0` - kwargs : + **kwargs Passed through to `ax.scatter` Returns