Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def resolve_input(user_input):
if isinstance(user_input, str):
s = sublime.load_settings('AlignTab.sublime-settings')
patterns = s.get('named_patterns', {})
if user_input == 'last_regex' and history.last():
user_input = history.last()
if user_input in patterns:
user_input = patterns[user_input]
if isinstance(user_input, str):
user_input = [user_input]
return user_input
def resolve_input(user_input):
if isinstance(user_input, str):
s = sublime.load_settings('AlignTab.sublime-settings')
patterns = s.get('named_patterns', {})
if user_input == 'last_regex' and history.last():
user_input = history.last()
if user_input in patterns:
user_input = patterns[user_input]
if isinstance(user_input, str):
user_input = [user_input]
return user_input