From c1c2418368cfcaa4f49edd7ec599fa45cce2d47d Mon Sep 17 00:00:00 2001 From: Cooper Lees Date: Mon, 7 Jun 2021 08:05:08 -0700 Subject: [PATCH] [primer] Enable everything (#2288) See if we pass all our repos with experimental string processing enabled. Django probably needed: - Ignores >= 3.8 only We could support PEP440 version specifiers, but that would introduce the packaging module as a dependency that I'd like to avoid ... Or I could implement a poor persons version or vendor Commit history before merge: * [primer] Enable everything * Add exclude extend to django CLI args for primer * Change default timeout to from 5 to 10 mins for a primer project * Skip string normalization for Django * Limit Django to >= 3.8 due to := operator --- src/black_primer/lib.py | 2 +- src/black_primer/primer.json | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/black_primer/lib.py b/src/black_primer/lib.py index 384c0ad..df67602 100644 --- a/src/black_primer/lib.py +++ b/src/black_primer/lib.py @@ -39,7 +39,7 @@ class Results(NamedTuple): async def _gen_check_output( cmd: Sequence[str], - timeout: float = 300, + timeout: float = 600, env: Optional[Dict[str, str]] = None, cwd: Optional[Path] = None, ) -> Tuple[bytes, bytes]: diff --git a/src/black_primer/primer.json b/src/black_primer/primer.json index 0343726..f1035a8 100644 --- a/src/black_primer/primer.json +++ b/src/black_primer/primer.json @@ -30,13 +30,16 @@ "py_versions": ["all"] }, "django": { - "disabled_reason": "black --check --diff returned 123 on tests_syntax_error.py", - "disabled": true, - "cli_arguments": ["--experimental-string-processing"], + "cli_arguments": [ + "--experimental-string-processing", + "--skip-string-normalization", + "--extend-exclude", + "/((docs|scripts)/|django/forms/models.py|tests/gis_tests/test_spatialrefsys.py|tests/test_runner_apps/tagged/tests_syntax_error.py)" + ], "expect_formatting_changes": true, "git_clone_url": "https://github.com/django/django.git", "long_checkout": false, - "py_versions": ["all"] + "py_versions": ["3.8", "3.9"] }, "flake8-bugbear": { "cli_arguments": ["--experimental-string-processing"], @@ -53,8 +56,6 @@ "py_versions": ["all"] }, "pandas": { - "disabled_reason": "black-primer runs failing on Pandas - #2193", - "disabled": true, "cli_arguments": ["--experimental-string-processing"], "expect_formatting_changes": true, "git_clone_url": "https://github.com/pandas-dev/pandas.git", -- 2.39.5