Open zouharvi opened 1 month ago
Definitelly dead code can be detected with vulture (pip install vulture
):
$ vulture . --min-confidence 100
Campaign/management/commands/ComputeAnnotatorMetrics.py:235: unreachable code after 'continue' (100% confidence)
Campaign/management/commands/ComputeAnnotatorMetrics.py:272: unreachable code after 'continue' (100% confidence)
Campaign/management/commands/ComputeWMT21Results.py:82: unused variable 'alpha' (100% confidence)
Campaign/management/commands/ComputeWMT23Results.py:82: unused variable 'alpha' (100% confidence)
Campaign/management/commands/ComputeZScores.py:59: unused variable 'alpha' (100% confidence)
Campaign/management/commands/ComputeZScores.py:570: unreachable code after 'continue' (100% confidence)
Campaign/management/commands/ComputeZScores.py:606: unreachable code after 'return' (100% confidence)
EvalData/management/commands/CreateDirectAssessmentDataWMT17.py:372: redundant if-condition (100% confidence)
EvalData/models/data_assessment.py:320: unreachable code after 'return' (100% confidence)
EvalData/models/direct_assessment.py:211: unreachable code after 'return' (100% confidence)
EvalData/models/direct_assessment_context.py:258: unreachable code after 'return' (100% confidence)
EvalData/models/pairwise_assessment.py:223: unreachable code after 'return' (100% confidence)
EvalData/models/pairwise_assessment_document.py:344: unreachable code after 'return' (100% confidence)
As of today, there are >100 instanced of
TODO
in source code. Some of them are in parts of code that is never executed (e.g. after return statement). A good introductory issue would be to take up some of them, understand it, and resolve+remove it.