From caadf3bf4ca1ea2ea3f655cb175e38f180d35eab Mon Sep 17 00:00:00 2001 From: WinChua Date: Sun, 17 May 2020 17:47:52 +0800 Subject: [PATCH] approve hit msg when python version is unsupported currently, when the python version used is not supported, it will raise "Python version None is currently not supported." --- parso/grammar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parso/grammar.py b/parso/grammar.py index f5d0475..0742d1c 100644 --- a/parso/grammar.py +++ b/parso/grammar.py @@ -252,7 +252,7 @@ def load_grammar(**kwargs): grammar = PythonGrammar(version_info, bnf_text) return _loaded_grammars.setdefault(path, grammar) except FileNotFoundError: - message = "Python version %s is currently not supported." % version + message = "Python version %s.%s is currently not supported." % (version_info.major, version_info.minor) raise NotImplementedError(message) else: raise NotImplementedError("No support for language %s." % language)