From d9294794b5106bb9e6a0b432ecf37cac7c75c866 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Fri, 19 Mar 2021 20:57:09 +0900 Subject: [PATCH] sort language --- wandbox/__init__.py | 2 +- wandbox/cli.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wandbox/__init__.py b/wandbox/__init__.py index c84318d..5ea62ef 100644 --- a/wandbox/__init__.py +++ b/wandbox/__init__.py @@ -1,5 +1,5 @@ __author__ = 'srz_zumix' -__version__ = '0.9.20' +__version__ = '0.9.21' __copyright__ = '2014-2021 %s ' % __author__ __license__ = """ diff --git a/wandbox/cli.py b/wandbox/cli.py index c2ce299..e74a768 100644 --- a/wandbox/cli.py +++ b/wandbox/cli.py @@ -12,6 +12,7 @@ import json import traceback import fnmatch +import operator from . import __version__ as VERSION from .wandbox import Wandbox @@ -51,6 +52,7 @@ def command_lang(self, args): def command_compiler(self, args): r = self.get_compiler_list(args.retry, args.retry_wait) + r = sorted(r, key=operator.itemgetter('language')) for d in r: if args.language: if args.language == d['language']: