terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.85k stars 250 forks source link

Bug: Python interval comparison CCN #173

Open rakhimov opened 7 years ago

rakhimov commented 7 years ago

The interval comparisons, e.g., a < b < c, are given CCN = 1 instead of CCN=2. The expression is equivalent to a < b and b < c.

Example code (from Lizard itself :-)):

if 0 <= number < count:
  sys.exit(1)