mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 16:05:02 +02:00
Only import the ast module on demand
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
# vim:fileencoding=utf-8
|
||||
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
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("'''", "'\\''") + "'''")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user