From 616373c8c07e0421cd2b857c38cf897bbee5f6d5 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 5 Dec 2022 12:16:56 +0100 Subject: [PATCH] pythonconsole: Remove ignore for removed checkers Command line:1:0: R0022: Useless option value for '-d', 'bad-continuation' was removed from pylint, see https://github.com/PyCQA/pylint/pull/3571. (useless-option-value) totem/src/plugins/pythonconsole/console.py:319:0: R0022: Useless option value for 'disable', 'R0201' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. (useless-option-value) totem/src/plugins/pythonconsole/console.py:321:0: R0022: Useless option value for 'disable', 'R0201' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. (useless-option-value) totem/src/plugins/pythonconsole/console.py:323:0: R0022: Useless option value for 'disable', 'R0201' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. (useless-option-value) totem/src/plugins/pythonconsole/console.py:325:0: R0022: Useless option value for 'disable', 'R0201' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. (useless-option-value) totem/src/plugins/pythonconsole/console.py:331:0: R0022: Useless option value for 'disable', 'R0201' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. (useless-option-value) totem/src/plugins/pythonconsole/console.py:333:0: R0022: Useless option value for 'disable', 'R0201' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. (useless-option-value) --- src/plugins/opensubtitles/meson.build | 2 +- src/plugins/pythonconsole/console.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/opensubtitles/meson.build b/src/plugins/opensubtitles/meson.build index 38fcc93fb..e47681b95 100644 --- a/src/plugins/opensubtitles/meson.build +++ b/src/plugins/opensubtitles/meson.build @@ -42,7 +42,7 @@ install_data( if pylint.found() test('pylint-' + plugin_name, pylint, - args: pylint_flags + ['-d', 'bad-continuation' ] + files([ plugin_name + '.py', 'hash.py' ]), + args: pylint_flags + files([ plugin_name + '.py', 'hash.py' ]), env: nomalloc, timeout: 120) endif diff --git a/src/plugins/pythonconsole/console.py b/src/plugins/pythonconsole/console.py index 7a8114114..aae015965 100644 --- a/src/plugins/pythonconsole/console.py +++ b/src/plugins/pythonconsole/console.py @@ -316,20 +316,20 @@ def flush(self): pass def fileno(self): return self.file_no - def isatty(self): # pylint: disable=R0201 + def isatty(self): return 0 - def read(self, _): # pylint: disable=R0201 + def read(self, _): return '' - def readline(self): # pylint: disable=R0201 + def readline(self): return '' - def readlines(self): # pylint: disable=R0201 + def readlines(self): return [] def write(self, seg): self.console.write(seg, self.tag) def writelines(self, lines): self.console.write(lines, self.tag) - def seek(self, _): # pylint: disable=R0201 + def seek(self, _): raise IOError((29, 'Illegal seek')) - def tell(self): # pylint: disable=R0201 + def tell(self): raise IOError((29, 'Illegal seek')) truncate = tell