reverbc / pylint-pytest

A Pylint plugin to suppress pytest-related false positives.
https://pypi.org/project/pylint-pytest/
MIT License
3 stars 8 forks source link

TypeError: unsupported operand type(s) for |=: 'bool' and 'NoneType' #18

Closed crown-bdee closed 3 years ago

crown-bdee commented 3 years ago

Describe the bug One of our projects is throwing up this error from the 1.1.1 release. Not sure if this is related to the remaining error's I mentioned #16 or something separate entirely.

$ pylint src
Traceback (most recent call last):
  File "/home/C*****o/projects/d*****r/.venv/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/__init__.py", line 24, in run_pylint
    PylintRun(sys.argv[1:])
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/lint/run.py", line 358, in __init__
    linter.check(args)
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 876, in check
    self._check_files(
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 910, in _check_files
    self._check_file(get_ast, check_astroid_module, name, filepath, modname)
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 936, in _check_file
    check_astroid_module(ast_node)
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 1070, in check_astroid_module
    retval = self._check_astroid_module(
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 1115, in _check_astroid_module
    walker.walk(ast_node)
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/utils/ast_walker.py", line 75, in walk
    self.walk(child)
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/utils/ast_walker.py", line 75, in walk
    self.walk(child)
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint/utils/ast_walker.py", line 72, in walk
    callback(astroid)
  File "/home/C*****o/projects/d*****r/.venv/lib/python3.8/site-packages/pylint_pytest/checkers/fixture.py", line 172, in visit_decorators
    uses_mark_deco |= _is_pytest_mark(decorator)
TypeError: unsupported operand type(s) for |=: 'bool' and 'NoneType'

To Reproduce Package versions pylint==2.7.4 pytest==6.2.3 pylint-pytest==1.1.1

reverbc commented 3 years ago

Thanks for reporting. This is fixed with a hotfix release 1.1.2

crown-bdee commented 3 years ago

Indeed it is! Thanks once again for the quick turnaround!