pyradius / pyrad

Python RADIUS Implementation
BSD 3-Clause "New" or "Revised" License
294 stars 187 forks source link

pylint is very upset with pyrad #62

Closed morrowc closed 4 years ago

morrowc commented 7 years ago

Global evaluation

Your code has been rated at -4.81/10

for pyrad/server.py

for the rest of that directory: $ for d in pyrad/*.py; do echo -n "$d: "; pylint $d | grep "Your code has been rated"; done pyrad/bidict.py: Your code has been rated at -4.23/10 pyrad/client.py: Your code has been rated at -1.85/10 pyrad/curved.py: Your code has been rated at 0.20/10 pyrad/dictfile.py: Your code has been rated at -3.38/10 pyrad/dictionary.py: Your code has been rated at -1.74/10 pyrad/host.py: Your code has been rated at -8.50/10 pyrad/init.py: Your code has been rated at -40.00/10 pyrad/packet.py: Your code has been rated at -3.26/10 pyrad/proxy.py: Your code has been rated at 0.00/10 pyrad/server.py: Your code has been rated at -4.81/10 (previous run: -4.81/10, +0.00) pyrad/tools.py: Your code has been rated at -2.61/10

that's ugly :( it'd be nice if it conformed somewhat better :)

morrowc commented 7 years ago

ugh, this is a pita to fix :( I'll see if I can automate my way to fixed code... and send a PR for this as well.

morrowc commented 7 years ago

There's a bunch of this form of error as well: "W: 67, 4: Redefining built-in 'id' (redefined-builtin)"

where 'id' is variously: hash, type, dict ... these seem dangerous, in the long term though a bit painful to fix across the board :( I've fixed some, but not all, at least right now.

morrowc commented 7 years ago

I believe pull request 65 fixes a bunch of the errors from above, and raises the lint level to something a bit more reasonable across the board: pyrad/bidict.py: Your code has been rated at 9.62/10 (previous run: 9.62/10, +0.00) pyrad/client.py: Your code has been rated at 9.38/10 (previous run: 9.38/10, +0.00) pyrad/curved.py: Your code has been rated at 3.80/10 (previous run: 5.80/10, -2.00) pyrad/dictfile.py: Your code has been rated at 8.97/10 (previous run: 8.97/10, +0.00) pyrad/dictionary.py: Your code has been rated at 8.86/10 (previous run: 8.86/10, +0.00) pyrad/host.py: Your code has been rated at 8.50/10 (previous run: 8.50/10, +0.00) pyrad/init.py: Your code has been rated at -40.00/10 (previous run: -40.00/10, +0.00) pyrad/packet.py: Your code has been rated at 8.88/10 (previous run: 8.88/10, +0.00) pyrad/proxy.py: Your code has been rated at 9.62/10 (previous run: 9.62/10, +0.00) pyrad/server.py: Your code has been rated at 8.94/10 (previous run: 8.94/10, +0.00) pyrad/tools.py: Your code has been rated at 7.61/10 (previous run: 7.61/10, +0.00)

And, oops I missed 2 constants, I reverted #65 and created #66 instead

morrowc commented 4 years ago

I'll see if I can come back later and re-open this with somethign substantive...