summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2019-11-09 00:46:06 -0800
committerTimothy Crosley <timothy.crosley@gmail.com>2019-11-09 00:46:06 -0800
commitaa72b8226b23247fdd2b2f4ac91244739ff4dea8 (patch)
tree38d308ca671e3d59c3b10daa3e538da30c0be0e4
parent5fccf078c654b69344ded47c2f4c7abddbd52c4d (diff)
downloadisort-aa72b8226b23247fdd2b2f4ac91244739ff4dea8.tar.gz
Fix typing error
-rw-r--r--isort/profiles.py3
-rw-r--r--isort/settings.py5
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)