[damned-lies] chore: split setup.cfg into files for every tools



commit 8977ee6b60e38bf44d8de851fc1c9a5420b300e3
Author: Guillaume Bernard <associations guillaume-bernard fr>
Date:   Mon May 9 15:06:22 2022 +0200

    chore: split setup.cfg into files for every tools

 .coveragerc          | 21 +++++++++++++++++++++
 setup.cfg => .flake8 | 24 ++----------------------
 common/tests.py      | 11 -----------
 3 files changed, 23 insertions(+), 33 deletions(-)
---
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 00000000..1d1859f1
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,21 @@
+[run]
+branch = True
+source =
+    api
+    common
+    languages
+    people
+    stats
+    teams
+    vertimus
+omit =
+    # Django generated files
+    */migrations/*
+    # Empty files in general
+    */__init__.py
+    # Tests are always 100% 'Tested'
+    */tests.py
+    */tests/*
+
+[html]
+directory = coverage_html_report
diff --git a/setup.cfg b/.flake8
similarity index 57%
rename from setup.cfg
rename to .flake8
index c0f0c590..64c5d0b2 100644
--- a/setup.cfg
+++ b/.flake8
@@ -16,26 +16,6 @@ exclude =
     */docs/source/conf.py
     # Damned Lies settings
     damnedlies/settings*
+    # Virtual environment
+    *venv*
 max-line-length = 119
-
-[coverage:run]
-branch = True
-source =
-    api
-    common
-    languages
-    people
-    stats
-    teams
-    vertimus
-omit =
-    # Django generated files
-    */migrations/*
-    # Empty files in general
-    */__init__.py
-    # Tests are always 100% 'Tested'
-    */tests.py
-    */tests/*
-
-[coverage:html]
-directory = coverage_html_report
diff --git a/common/tests.py b/common/tests.py
index 2b1b98f3..6a83a9ca 100644
--- a/common/tests.py
+++ b/common/tests.py
@@ -16,17 +16,6 @@ from .utils import lc_sorted, pyicu_present, trans_sort_object_list
 
 
 class CommonTest(DjangoTestCase):
-    def test_setup_cfg_ascii(self):
-        """
-        setup.cfg is read by setuptools during the installation process,
-        which cannot understand unicode characters.
-        """
-        setup_path = Path(__file__).parent.parent / 'setup.cfg'
-        with setup_path.open('rb') as fh:
-            try:
-                fh.read().decode('ascii')
-            except UnicodeDecodeError:
-                self.fail("setup.cfg contains non-ASCII chars")
 
     def test_admin_login(self):
         response = self.client.get(reverse('admin:index'))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]