************* Module filetwo filetwo.py:1: [R0801(duplicate-code), ] Similar lines in 2 files ==fileone:3 ==filetwo:3 def selection_sort(to_sort): """ The greatest sorting algorithm? """ new_list = [] final_size = len(to_sort) while len(new_list) < final_size: candidate_index = 0 for index in xrange(len(to_sort)): if to_sort[index] <= to_sort[candidate_index]: candidate_index = index new_list.append(to_sort.pop(candidate_index)) return new_list Report ====== 21 statements analysed. Statistics by type ------------------ +---------+-------+-----------+-----------+------------+---------+ |type |number |old number |difference |%documented |%badname | +=========+=======+===========+===========+============+=========+ |module |2 |2 |= |100.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |class |0 |0 |= |0 |0 | +---------+-------+-----------+-----------+------------+---------+ |method |0 |0 |= |0 |0 | +---------+-------+-----------+-----------+------------+---------+ |function |2 |2 |= |100.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ Raw metrics ----------- +----------+-------+------+---------+-----------+ |type |number |% |previous |difference | +==========+=======+======+=========+===========+ |code |20 |52.63 |20 |= | +----------+-------+------+---------+-----------+ |docstring |12 |31.58 |12 |= | +----------+-------+------+---------+-----------+ |comment |0 |0.00 |0 |= | +----------+-------+------+---------+-----------+ |empty |6 |15.79 |6 |= | +----------+-------+------+---------+-----------+ Duplication ----------- +-------------------------+-------+---------+-----------+ | |now |previous |difference | +=========================+=======+=========+===========+ |nb duplicated lines |13 |13 |= | +-------------------------+-------+---------+-----------+ |percent duplicated lines |40.625 |40.625 |= | +-------------------------+-------+---------+-----------+ Messages by category -------------------- +-----------+-------+---------+-----------+ |type |number |previous |difference | +===========+=======+=========+===========+ |convention |0 |0 |= | +-----------+-------+---------+-----------+ |refactor |1 |1 |= | +-----------+-------+---------+-----------+ |warning |0 |0 |= | +-----------+-------+---------+-----------+ |error |0 |0 |= | +-----------+-------+---------+-----------+ Messages -------- +---------------+------------+ |message id |occurrences | +===============+============+ |duplicate-code |1 | +---------------+------------+ Global evaluation ----------------- Your code has been rated at 9.52/10 (previous run: 9.52/10, +0.00)