From f8b9b80fc1004e5f35e96fdc82596fa6c63fbbac Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Sat, 12 Jun 2021 13:07:10 +0200
Subject: [PATCH] [fix] #134: insert-license: ignore docs folder, fix example
 header

Fix pre-commit alignment
---
 .pre-commit-config.yaml |  7 ++++---
 examples/__init__.py    | 30 ++++++++++++++----------------
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index f39988c2..df6eebe9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -22,9 +22,10 @@ repos:
 -   repo: https://github.com/Lucas-C/pre-commit-hooks
     rev: v1.1.10
     hooks:
-    -   id: insert-license
-        files: \.py$
-        args:
+    - id: insert-license
+      exclude: ^docs/
+      files: \.py$
+      args:
         - --license-filepath
         - license_header.txt
 -   repo: https://gitlab.com/devopshq/gitlab-ci-linter
diff --git a/examples/__init__.py b/examples/__init__.py
index 44583800..713bb789 100644
--- a/examples/__init__.py
+++ b/examples/__init__.py
@@ -1,19 +1,17 @@
-"""
-Copyright  2014-2021 Vincent Texier <vit@free.fr>
-
-DuniterPy is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-DuniterPy is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-"""
+# Copyright  2014-2021 Vincent Texier <vit@free.fr>
+#
+# DuniterPy is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# DuniterPy is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from .create_public_key import create_public_key
 from .listen_ws2p import listen_ws2p
-- 
GitLab