Unbabel/OpenKiwi

View on GitHub
kiwi/systems/qe_system.py

Summary

Maintainability
C
1 day
Test Coverage
B
85%

File qe_system.py has 507 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#  OpenKiwi: Open-Source Machine Translation Quality Estimation
#  Copyright (C) 2020 Unbabel <openkiwi@unbabel.com>
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published
Severity: Major
Found in kiwi/systems/qe_system.py - About 1 day to fix

    Function load_from_checkpoint has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def load_from_checkpoint(
    Severity: Minor
    Found in kiwi/systems/qe_system.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if selection not in metrics:
                                  raise KeyError(
                                      f'Main metric {selection} is not a configured metric; '
                                      f'available options are: {list(metrics.keys())}'
                                  )
      Severity: Major
      Found in kiwi/systems/qe_system.py - About 45 mins to fix

        Function set_config_options has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def set_config_options(
        Severity: Minor
        Found in kiwi/systems/qe_system.py - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status