summaryrefslogtreecommitdiff
path: root/isort/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'isort/settings.py')
-rw-r--r--isort/settings.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/isort/settings.py b/isort/settings.py
index 387d10e4..04b488f1 100644
--- a/isort/settings.py
+++ b/isort/settings.py
@@ -208,6 +208,11 @@ class _Config:
object.__setattr__(self, "no_sections", True)
object.__setattr__(self, "lines_between_types", 1)
object.__setattr__(self, "from_first", True)
+ if self.wrap_length > self.line_length:
+ raise ValueError(
+ "wrap_length must be set lower than or equal to line_length: "
+ f"{self.wrap_length} > {self.line_length}."
+ )
_DEFAULT_SETTINGS = {**vars(_Config()), "source": "defaults"}