[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #26483 [Core Tor/Stem]: Static check results in "local variable 'exc' is assigned to but never used"



#26483: Static check results in "local variable 'exc' is assigned to but never
used"
-------------------------------+----------------------
     Reporter:  dmr            |      Owner:  dmr
         Type:  defect         |     Status:  assigned
     Priority:  Medium         |  Milestone:
    Component:  Core Tor/Stem  |    Version:
     Severity:  Normal         |   Keywords:
Actual Points:                 |  Parent ID:
       Points:                 |   Reviewer:
      Sponsor:                 |
-------------------------------+----------------------
 [[https://github.com/PyCQA/pyflakes/commit/efddb93524db7949322181d5e14c32681779a6e8|pyflakes
 updated to 2.0.0]] now additionally "[checks] for unused exception binding
 in `except:` block", causing the following lint errors:
 {{{
 STATIC CHECKS
 * /path/to/stem/descriptor/reader.py
   line 515  - local variable 'exc' is assigned to but never used | except
 TypeError as exc:

 * /path/to/stem/util/system.py
   line 1327 - local variable 'exc' is assigned to but never used | except
 CallTimeoutError as exc:

 * /path/to/stem/interpreter/__init__.py
   line 148  - local variable 'exc' is assigned to but never used | except
 (KeyboardInterrupt, stem.SocketClosed) as exc:
   line 172  - local variable 'exc' is assigned to but never used | except
 stem.SocketClosed as exc:
   line 184  - local variable 'exc' is assigned to but never used | except
 (KeyboardInterrupt, EOFError, stem.SocketClosed) as exc:
 }}}
 line numbers as of
 [[https://gitweb.torproject.org/stem.git/tree/stem/?id=3818cf41cae98ae7558f5002ef3a5152ede5b2fb|3818cf41cae98ae7558f5002ef3a5152ede5b2fb]]

 Strangely, those only appear for py35 runs - I didn't see them in my py27
 runs. Not sure why that is.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26483>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs