Skip to content

E1131: unsupported operand type(s) for | (unsupported-binary-operation) for DWORD().value #4526

@jiasli

Description

@jiasli

Steps to reproduce

from ctypes.wintypes import DWORD

print(DWORD().value | 0x0001)

Starting from astroid 2.5.7, pylint gives error:

testproj\main.py:4:6: E1131: unsupported operand type(s) for | (unsupported-binary-operation)

Expected behavior

pylint shouldn't report any error.

pylint --version output

pylint 2.8.2
astroid 2.5.7
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions