From d879088744d92b4505175bc56abe500becb20c50 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 25 Apr 2021 08:43:18 +0200 Subject: [PATCH] Fix breaking change in pylint 2.8.0 The test on numversion does not check anything on the 8 or the 0 so hardcoding it is okay right now. --- pylama/lint/pylama_pylint.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pylama/lint/pylama_pylint.py b/pylama/lint/pylama_pylint.py index 31ff12f..5551e16 100644 --- a/pylama/lint/pylama_pylint.py +++ b/pylama/lint/pylama_pylint.py @@ -4,7 +4,11 @@ from astroid import MANAGER from pylama.lint import Linter as BaseLinter -from pylint.__pkginfo__ import numversion +try: + from pylint.__pkginfo__ import numversion +except ImportError: + # There was a breaking change in pylint 2.8.0 + numversion = (2, 8, 0) from pylint.lint import Run from pylint.reporters import BaseReporter