Add Dj3.1 support and update flake8 and black versions
This commit is contained in:
1 parent
39a21ad46a
commit
50294a213b
7 files changed
+24
-6
No files matched your search
@@ -32,6 +32,8 @@ jobs:
|
|||||||
env: TOXENV=py36-django22
|
env: TOXENV=py36-django22
|
||||||
- python: 3.6
|
- python: 3.6
|
||||||
env: TOXENV=py36-django30
|
env: TOXENV=py36-django30
|
||||||
|
- python: 3.6
|
||||||
|
env: TOXENV=py36-django31
|
||||||
|
|
||||||
- python: 3.7
|
- python: 3.7
|
||||||
env: TOXENV=py37-django111
|
env: TOXENV=py37-django111
|
||||||
@@ -43,6 +45,8 @@ jobs:
|
|||||||
env: TOXENV=py37-django22
|
env: TOXENV=py37-django22
|
||||||
- python: 3.7
|
- python: 3.7
|
||||||
env: TOXENV=py37-django30
|
env: TOXENV=py37-django30
|
||||||
|
- python: 3.7
|
||||||
|
env: TOXENV=py37-django31
|
||||||
|
|
||||||
- python: 3.8
|
- python: 3.8
|
||||||
env: TOXENV=py38-django111
|
env: TOXENV=py38-django111
|
||||||
@@ -54,6 +58,8 @@ jobs:
|
|||||||
env: TOXENV=py38-django22
|
env: TOXENV=py38-django22
|
||||||
- python: 3.8
|
- python: 3.8
|
||||||
env: TOXENV=py38-django30
|
env: TOXENV=py38-django30
|
||||||
|
- python: 3.8
|
||||||
|
env: TOXENV=py38-django31
|
||||||
|
|
||||||
- python: 3.6
|
- python: 3.6
|
||||||
env: TOXENV=lint
|
env: TOXENV=lint
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
## 2.4.1
|
||||||
|
|
||||||
|
* Add Django 3.1 support
|
||||||
|
* Upgrade linter versions of `flake8` and `black` to the latest
|
||||||
|
|
||||||
## 2.4.0
|
## 2.4.0
|
||||||
|
|
||||||
* Add possibility to lint newly generated migrations through the `makemigrations` command.
|
* Add possibility to lint newly generated migrations through the `makemigrations` command.
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Command(MakeMigrationsCommand):
|
|||||||
def add_arguments(self, parser):
|
def add_arguments(self, parser):
|
||||||
super(Command, self).add_arguments(parser)
|
super(Command, self).add_arguments(parser)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--lint", action="store_true", help="Lint newly generated migrations.",
|
"--lint",
|
||||||
|
action="store_true",
|
||||||
|
help="Lint newly generated migrations.",
|
||||||
)
|
)
|
||||||
register_linting_configuration_options(parser)
|
register_linting_configuration_options(parser)
|
||||||
|
|
||||||
|
|||||||
@@ -17,5 +17,7 @@ def register_linting_configuration_options(parser):
|
|||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--warnings-as-errors", action="store_true", help="handle warnings as errors",
|
"--warnings-as-errors",
|
||||||
|
action="store_true",
|
||||||
|
help="handle warnings as errors",
|
||||||
)
|
)
|
||||||
@@ -58,6 +58,7 @@ setup(
|
|||||||
"Framework :: Django :: 2.1",
|
"Framework :: Django :: 2.1",
|
||||||
"Framework :: Django :: 2.2",
|
"Framework :: Django :: 2.2",
|
||||||
"Framework :: Django :: 3.0",
|
"Framework :: Django :: 3.0",
|
||||||
|
"Framework :: Django :: 3.1",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 2",
|
"Programming Language :: Python :: 2",
|
||||||
"Programming Language :: Python :: 2.7",
|
"Programming Language :: Python :: 2.7",
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ class DataMigrationDetectionTestCase(unittest.TestCase):
|
|||||||
def setUp(self, *args, **kwargs):
|
def setUp(self, *args, **kwargs):
|
||||||
self.test_project_path = os.path.dirname(settings.BASE_DIR)
|
self.test_project_path = os.path.dirname(settings.BASE_DIR)
|
||||||
self.linter = MigrationLinter(
|
self.linter = MigrationLinter(
|
||||||
self.test_project_path, include_apps=fixtures.DATA_MIGRATIONS,
|
self.test_project_path,
|
||||||
|
include_apps=fixtures.DATA_MIGRATIONS,
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_reverse_data_migration(self):
|
def test_reverse_data_migration(self):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
envlist =
|
envlist =
|
||||||
py27-django111
|
py27-django111
|
||||||
py{35,36,37,38}-django{111,20,21,22}
|
py{35,36,37,38}-django{111,20,21,22}
|
||||||
py{36,37,38}-django{30}
|
py{36,37,38}-django{30,31}
|
||||||
lint
|
lint
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@@ -15,12 +15,13 @@ deps =
|
|||||||
django21: django>=2.1,<2.2
|
django21: django>=2.1,<2.2
|
||||||
django22: django>=2.2,<2.3
|
django22: django>=2.2,<2.3
|
||||||
django30: django>=3.0,<3.1
|
django30: django>=3.0,<3.1
|
||||||
|
django31: django>=3.1,<3.2
|
||||||
|
|
||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
basepython = python3.6
|
basepython = python3.6
|
||||||
deps =
|
deps =
|
||||||
flake8==3.8.3
|
flake8==3.8.4
|
||||||
black==19.10b0
|
black==20.8b1
|
||||||
commands =
|
commands =
|
||||||
flake8 --max-line-length=88 django_migration_linter
|
flake8 --max-line-length=88 django_migration_linter
|
||||||
black --check django_migration_linter/ tests/ manage.py setup.py
|
black --check django_migration_linter/ tests/ manage.py setup.py
|
||||||
Reference in new issue
Block a user