diff options
-rw-r--r-- | isort/profiles.py | 3 | ||||
-rw-r--r-- | isort/settings.py | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/isort/profiles.py b/isort/profiles.py index 270b458d..669c8277 100644 --- a/isort/profiles.py +++ b/isort/profiles.py @@ -1,4 +1,5 @@ """Common profiles are defined here to be easily used within a project using --profile {name}""" +from typing import Any, Dict black = { "multi_line_output": 3, @@ -43,7 +44,7 @@ hug = { "line_length": 100, } -profiles = { +profiles: Dict[str, Dict[str, Any]] = { "black": black, "django": django, "pycharm": pycharm, diff --git a/isort/settings.py b/isort/settings.py index 709f230c..607c67b6 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -224,15 +224,14 @@ class Config(_Config): config_settings = {} profile_name = config_overrides.get("profile", config_settings.get("profile", "")) + profile: Dict[str, Any] = {} if profile_name: if profile_name not in profiles: - raise ProfileDoesNotExist(profile) + raise ProfileDoesNotExist(profile_name) profile = profiles[profile_name].copy() profile["source"] = f"{profile_name} profile" sources.append(profile) - else: - profile = {} if config_settings: sources.append(config_settings) |