This was an issue with pylint and was fixed in pylint v 2.8.0. Changelog: http://pylint.pycqa.org/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-8-0
On Mon., May 31, 2021, 7:19 a.m. Ed Lipson, <edlipso...@gmail.com> wrote: > I was running pylint (2.6.0) in VS Code against a module, the code was > working. > > if (amt := self._data[index.row()][index.column()]) \ > and float(amt) < 0.0: > return QColor('red') > > I got the above error and had to change it to the below to clear the error. > > amt = self._data[index.row()][index.column()] > if amt and float(amt) < 0.0: > return QColor('red') > > I had thought the walrus was implemented to foster this style of code. > > > Thanks, > Ed > > _______________________________________________ > code-quality mailing list -- code-quality@python.org > To unsubscribe send an email to code-quality-le...@python.org > https://mail.python.org/mailman3/lists/code-quality.python.org/ > Member address: maria...@python.org >
_______________________________________________ code-quality mailing list -- code-quality@python.org To unsubscribe send an email to code-quality-le...@python.org https://mail.python.org/mailman3/lists/code-quality.python.org/ Member address: arch...@mail-archive.com