Skip to content

No attribute 'from_bytes' on Type[int] [attribute-error] #413

@pjz

Description

@pjz

I have a call that looks like:

i = int.from_bytes(h.digest(), byteorder='big')

and it got flagged with

No attribute 'from_bytes' on Type[int] [attribute-error]

which is clearly wrong since:

Python 3.7.4 (default, Sep  3 2019, 12:43:59) 
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> help(int.from_bytes)
Help on built-in function from_bytes:

from_bytes(bytes, byteorder, *, signed=False) method of builtins.type instance
    Return the integer represented by the given array of bytes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions