diff --git a/ckanext/__init__.py b/ckanext/__init__.py
index 3a61b90c..7b20d335 100644
--- a/ckanext/__init__.py
+++ b/ckanext/__init__.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,8 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
-
# this is a namespace package
try:
import pkg_resources
diff --git a/ckanext/saml2auth/helpers.py b/ckanext/saml2auth/helpers.py
index cab219cf..9468732b 100644
--- a/ckanext/saml2auth/helpers.py
+++ b/ckanext/saml2auth/helpers.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
import logging
import string
import re
diff --git a/ckanext/saml2auth/plugin.py b/ckanext/saml2auth/plugin.py
index 7bebd1c5..e20c7d6d 100644
--- a/ckanext/saml2auth/plugin.py
+++ b/ckanext/saml2auth/plugin.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
diff --git a/ckanext/saml2auth/spconfig.py b/ckanext/saml2auth/spconfig.py
index 0d0eae8b..d4a19cc1 100644
--- a/ckanext/saml2auth/spconfig.py
+++ b/ckanext/saml2auth/spconfig.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
from saml2.saml import NAME_FORMAT_URI
from ckan.common import config as ckan_config
diff --git a/ckanext/saml2auth/tests/test_blueprint.py b/ckanext/saml2auth/tests/test_blueprint.py
index b07b90b4..e49e8c2a 100644
--- a/ckanext/saml2auth/tests/test_blueprint.py
+++ b/ckanext/saml2auth/tests/test_blueprint.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
import os
import pytest
diff --git a/ckanext/saml2auth/tests/test_blueprint_get_request.py b/ckanext/saml2auth/tests/test_blueprint_get_request.py
index d084afa4..f0c70f91 100644
--- a/ckanext/saml2auth/tests/test_blueprint_get_request.py
+++ b/ckanext/saml2auth/tests/test_blueprint_get_request.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
import base64
from datetime import datetime
from jinja2 import Template
diff --git a/ckanext/saml2auth/tests/test_client.py b/ckanext/saml2auth/tests/test_client.py
index 6d74ef91..cca097ad 100644
--- a/ckanext/saml2auth/tests/test_client.py
+++ b/ckanext/saml2auth/tests/test_client.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
import os
import pytest
from ckanext.saml2auth.views.saml2auth import saml2login
diff --git a/ckanext/saml2auth/tests/test_helpers.py b/ckanext/saml2auth/tests/test_helpers.py
index 35299908..46d692e6 100644
--- a/ckanext/saml2auth/tests/test_helpers.py
+++ b/ckanext/saml2auth/tests/test_helpers.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
import pytest
import ckan.authz as authz
diff --git a/ckanext/saml2auth/tests/test_spconfig.py b/ckanext/saml2auth/tests/test_spconfig.py
index 1facc8f9..b2907760 100644
--- a/ckanext/saml2auth/tests/test_spconfig.py
+++ b/ckanext/saml2auth/tests/test_spconfig.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
import pytest
from ckanext.saml2auth.spconfig import get_config
diff --git a/ckanext/saml2auth/views/saml2auth.py b/ckanext/saml2auth/views/saml2auth.py
index 8a8faf32..6180f0a7 100644
--- a/ckanext/saml2auth/views/saml2auth.py
+++ b/ckanext/saml2auth/views/saml2auth.py
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# encoding: utf-8
import logging
import copy
diff --git a/conftest.py b/conftest.py
index 7a44f461..4f5911d4 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,8 +17,6 @@
along with this program. If not, see .
"""
-# -*- coding: utf-8 -*-
-
pytest_plugins = [
u'ckan.tests.pytest_ckan.ckan_setup',
u'ckan.tests.pytest_ckan.fixtures',
diff --git a/setup.py b/setup.py
index 63d10f11..67f61de6 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
"""
Copyright (c) 2020 Keitaro AB
@@ -15,7 +17,6 @@
along with this program. If not, see .
"""
-# -*- coding: utf-8 -*-
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from codecs import open # To use a consistent encoding