OWASP/cornucopia

View on GitHub
scripts/convert.py

Summary

Maintainability
D
2 days
Test Coverage
A
91%

File convert.py has 822 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python3
import argparse
import docx2pdf  # type: ignore
import docx  # type: ignore
import fnmatch
Severity: Major
Found in scripts/convert.py - About 1 day to fix

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

    def get_mapping_for_edition(
    Severity: Minor
    Found in scripts/convert.py - About 45 mins to fix

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

      def valid_meta(meta: Dict[str, Any], language: str, edition: str, version: str, template: str, layout: str) -> bool:
      Severity: Minor
      Found in scripts/convert.py - About 45 mins to fix

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

        def create_edition_from_template(
        Severity: Minor
        Found in scripts/convert.py - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status