From 1d275c6b352edec76b7197958ab648ebb80b927f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 27 Aug 2018 12:43:20 +0530 Subject: [PATCH] Only import the ast module on demand --- kitty/conf/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/conf/utils.py b/kitty/conf/utils.py index 63cce13d5..d4476aaf7 100644 --- a/kitty/conf/utils.py +++ b/kitty/conf/utils.py @@ -2,7 +2,6 @@ # vim:fileencoding=utf-8 # License: GPL v3 Copyright: 2018, Kovid Goyal -import ast import os import re import shlex @@ -40,6 +39,7 @@ def to_cmdline(x): def python_string(text): + import ast return ast.literal_eval("'''" + text.replace("'''", "'\\''") + "'''")