Commit Graph

10 Commits

Author SHA1 Message Date
tpltnt
c8f11dc2d3 ported old-style classes to new-style 2019-05-26 08:28:18 +02:00
heartsucker
0750dbac38
updated all python files to use pep-3110 exception syntax for python3 compatibility 2019-04-04 11:57:58 +02:00
heartsucker
55f8408718
use print function over print statement in ./misc/ directory 2019-03-22 11:41:16 +01:00
Brian Warner
5e62118e14 hush somewhat-real problems found by static analysis
These would have caused problems if a certain unlikely code path was taken:
mostly error-handling pathways.
2017-12-31 00:23:43 +01:00
david-sarah
4d6260d6ad check-miscaptures.py: report the number of files that were not analysed due to syntax errors (and don't count them in the number of suspicious captures). refs #1555 2011-10-09 05:03:01 +00:00
david-sarah
efd3c8b113 check-miscaptures.py: handle corner cases around default arguments correctly. Also make a minor optimization when there are no assigned variables to consider. refs #1555 2011-10-09 04:50:23 +00:00
david-sarah
5359c24e99 check-miscaptures.py: Python doesn't really have declarations; report the topmost assignment. refs #1555 2011-10-09 04:48:00 +00:00
david-sarah
1c6fe1d230 check-miscaptures.py: handle destructuring function arguments correctly. refs #1555 2011-10-09 04:47:10 +00:00
david-sarah
d2f3ef9714 check-miscaptures.py: check while loops and list comprehensions as well as for loops. Also fix a pyflakes warning. refs #1555 2011-10-09 04:40:22 +00:00
david-sarah
be1c94893f Add misc/coding_tools/check-miscaptures.py to detect incorrect captures of variables declared in a for loop, and a 'make check-miscaptures' Makefile target to run it. (It is also run by 'make code-checks'.) This is a rewritten version that reports much fewer false positives, by determining captured variables more accurately. fixes #1555 2011-10-07 07:41:21 +00:00