Warning in python file when i m using pychecker.

A

Avnesh Shakya

hi,
I am trying to run my file using pychecker, but it's showing warning. I am unable to get these warning. Please help me, how to remove these warning. I am using pychecker first time.

avin@HP:~/github/UdacitySiteData$ pychecker udacity_to_jsonFinal.py
Processing module udacity_to_jsonFinal (udacity_to_jsonFinal.py)...

Warnings...

[system path]/dist-packages/bs4/__init__.py:206: Parameter (successor) not used
[system path]/dist-packages/bs4/__init__.py:209: Parameter (successor) not used
[system path]/dist-packages/bs4/__init__.py:213: Local variable (tag) not used

[system path]/dist-packages/bs4/element.py:306: Parameter (kwargs) not used
[system path]/dist-packages/bs4/element.py:507: (id) shadows builtin
[system path]/dist-packages/bs4/element.py:791: (next) shadows builtin
[system path]/dist-packages/bs4/element.py:903: Invalid arguments to (__repr__), got 2, expected 1

Thanks.
 
D

Dave Angel

hi,
I am trying to run my file using pychecker, but it's showing warning. I am unable to get these warning. Please help me, how to remove these warning. I am using pychecker first time.

avin@HP:~/github/UdacitySiteData$ pychecker udacity_to_jsonFinal.py
Processing module udacity_to_jsonFinal (udacity_to_jsonFinal.py)...

Warnings...

[system path]/dist-packages/bs4/__init__.py:206: Parameter (successor) not used
[system path]/dist-packages/bs4/__init__.py:209: Parameter (successor) not used
[system path]/dist-packages/bs4/__init__.py:213: Local variable (tag) not used

[system path]/dist-packages/bs4/element.py:306: Parameter (kwargs) not used
[system path]/dist-packages/bs4/element.py:507: (id) shadows builtin
[system path]/dist-packages/bs4/element.py:791: (next) shadows builtin
[system path]/dist-packages/bs4/element.py:903: Invalid arguments to (__repr__), got 2, expected 1

Thanks.

What's not clear about any of these? On line 206, you defined some
function and one of the formal parameters was called successor. You
don't use that value anywhere in the function. The fix? Omit the
unused parameter in the function definition, and change all the caller
sites. Sometimes this is impractical, for example in functions that are
callbacks from code you don't control.

Likewise for the next 3.

id() is a built-in function, so you shouldn't use that name for your own
functions or variables. rename it.

Likewise next, which is even more likely to cause confusion, since next
is frequently used in real code, while id() is more likely a debugging aid.

If you want anything more detailed, perhaps you should show the context
around each warning. You have the line numbers, so that should be easy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top