Add internal classes and add type hints + mypy.

This commit is contained in:
David Wobrock authored and David Wobrock committed 2022-12-26 16:26:24 +01:00
1 parent 847ac1241a
commit 2ee7dac3b3
88 files changed
+603 -340

No files matched your search

+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import tempfile
import unittest
+4 -2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import unittest
from django_migration_linter.sql_analyser import (
@@ -28,9 +30,9 @@ class SqlAnalyserTestCase(unittest.TestCase):
self.assertNotEqual(0, len(errors), "Found no errors in sql")
if code:
self.assertTrue(
any(err["code"] == code for err in errors),
any(err.code == code for err in errors),
"Didn't find error code {} in returned errors ({})".format(
code, [err["code"] for err in errors]
code, [err.code for err in errors]
),
)
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import unittest
from django_migration_linter.utils import split_migration_path, split_path