Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instance of 'UUID' has no 'int' member (no-member) #961

Closed
crbunney opened this issue Jun 28, 2016 · 1 comment
Closed

Instance of 'UUID' has no 'int' member (no-member) #961

crbunney opened this issue Jun 28, 2016 · 1 comment
Labels
Minor 💅 Polishing pylint is always nice Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade)

Comments

@crbunney
Copy link

crbunney commented Jun 28, 2016

The UUID.int attribute exists as per the docs, but appears to be set dynamically in the UUID class' __init__ (if I've been looking at the correct code):

self.__dict__['int'] = int

This seems to cause pylint to generate an Error message when it shouldn't

Steps to reproduce

I created this test file:

import uuid

u = uuid.UUID('{12345678-1234-5678-1234-567812345678}')
print u.int

I ran this command on it: pylint -r n --unsafe-load-any-extension y --errors-only test.py
This output was generated:

No config file found, using default configuration
************* Module test
E:  4, 6: Instance of 'UUID' has no 'int' member (no-member)

Current behavior

The call to u.int is flagged as a potential missing member

Expected behavior

No error raised

pylint --version output

No config file found, using default configuration
pylint 1.5.6,
astroid 1.4.6
Python 2.7.11 (default, Jan 22 2016, 08:29:18)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]

pip freeze

astroid==1.4.6
colorama==0.3.7
lazy-object-proxy==1.2.2
pylint==1.5.6
six==1.10.0
wrapt==1.10.8
@PCManticore PCManticore added the Minor 💅 Polishing pylint is always nice label Jun 28, 2016
@PCManticore
Copy link
Contributor

Thank you for reporting this issue. We do not currently understand modifications of the instance's dictionary, as it is the case for what UUID is doing, but this can be solved in the mean time through an astroid brain tip, through which we can inject the attribute in the AST.

gerrit-ovirt-org pushed a commit to oVirt/vdsm that referenced this issue Apr 28, 2017
Due to pylint-dev/pylint#961
pylint does not recognize uuid.UUID.int

Change-Id: I94c8d6d3a38bc3d2fc9fa408d07649eb78afca3f
Signed-off-by: Dan Kenigsberg <danken@redhat.com>
nirs added a commit to nirs/vdsm that referenced this issue Jun 25, 2017
The old code was broken on python 3 because it used float division (/),
and was depending on long integer representation ("L" suffix).  It also
tried to reinvent the uuid module. We use now the uuid module for
converting to/from integer value and uuid string.

Due to pylint-dev/pylint#961, we have to disable pylint member check when
accessing UUID's int attribute.

Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs added a commit to nirs/vdsm that referenced this issue Jun 26, 2017
The old code was broken on python 3 because it used float division (/),
and was depending on long integer representation ("L" suffix).  It also
tried to reinvent the uuid module. We use now the uuid module for
converting to/from integer value and uuid string.

Due to pylint-dev/pylint#961, we have to disable pylint member check when
accessing UUID's int attribute.

Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs added a commit to nirs/vdsm that referenced this issue Jun 26, 2017
The old code was broken on python 3 because it used float division (/),
and was depending on long integer representation ("L" suffix).  It also
tried to reinvent the uuid module. We use now the uuid module for
converting to/from integer value and uuid string.

Due to pylint-dev/pylint#961, we have to disable pylint member check when
accessing UUID's int attribute.

Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs added a commit to nirs/vdsm that referenced this issue Jun 26, 2017
The old code was broken on python 3 because it used float division (/),
and was depending on long integer representation ("L" suffix).  It also
tried to reinvent the uuid module. We use now the uuid module for
converting to/from integer value and uuid string.

Due to pylint-dev/pylint#961, we have to disable pylint member check when
accessing UUID's int attribute.

Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs added a commit to nirs/vdsm that referenced this issue Jun 26, 2017
The old code was broken on python 3 because it used float division (/),
and was depending on long integer representation ("L" suffix).  It also
tried to reinvent the uuid module. We use now the uuid module for
converting to/from integer value and uuid string.

Due to pylint-dev/pylint#961, we have to disable pylint member check when
accessing UUID's int attribute.

Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs added a commit to nirs/vdsm that referenced this issue Jun 26, 2017
The old code was broken on python 3 because it used float division (/),
and was depending on long integer representation ("L" suffix).  It also
tried to reinvent the uuid module. We use now the uuid module for
converting to/from integer value and uuid string.

Due to pylint-dev/pylint#961, we have to disable pylint member check when
accessing UUID's int attribute.

Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs added a commit to nirs/vdsm that referenced this issue Jun 30, 2017
The old code was broken on python 3 because it used float division (/),
and was depending on long integer representation ("L" suffix).  It also
tried to reinvent the uuid module. We use now the uuid module for
converting to/from integer value and uuid string.

Due to pylint-dev/pylint#961, we have to disable pylint member check when
accessing UUID's int attribute.

Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs added a commit to nirs/vdsm that referenced this issue Jul 2, 2017
The old code was broken on python 3 because it used float division (/),
and was depending on long integer representation ("L" suffix).  It also
tried to reinvent the uuid module. We use now the uuid module for
converting to/from integer value and uuid string.

Due to pylint-dev/pylint#961, we have to disable pylint member check when
accessing UUID's int attribute.

Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
gerrit-ovirt-org pushed a commit to oVirt/vdsm that referenced this issue Jul 3, 2017
The old code was broken on python 3 because it used float division (/),
and was depending on long integer representation ("L" suffix).  It also
tried to reinvent the uuid module. We use now the uuid module for
converting to/from integer value and uuid string.

Due to pylint-dev/pylint#961, we have to disable pylint member check when
accessing UUID's int attribute.

Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
@AWhetter AWhetter added the Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) label Jul 8, 2017
brycepg pushed a commit to brycepg/astroid that referenced this issue Feb 27, 2018
gerrit-ovirt-org pushed a commit to oVirt/vdsm that referenced this issue Jul 7, 2021
pylint fixed the issue with UUID.int in 2018[1], and pylint 2.4.0 does
not complain about missing member.

[1] pylint-dev/pylint#961

Change-Id: I22ba28dcc91e4825c85fa01c7aa1bd383105f9df
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor 💅 Polishing pylint is always nice Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade)
Projects
None yet
Development

No branches or pull requests

3 participants