Skip to content

Python cleanup and refactor

Christian Aribaud requested to merge python-3.11-upgrade into master

This merge request would resolve both #28 (closed) and #29 (closed)

What it generally does is :

  • remove mine_translators.py
  • merge both json generators into generate_json_episodes_lists.py
    • The script now takes output files as arguments instead of printing it out to stdout
  • refactor and upgrade renderfarm-lite.py

What it specifically did is :

  • Add typing
  • replace os and os.path with pathlib.Path
  • use f-string for string formating
  • split some large functions into smaller ones
  • refactor how some functions works
  • change and add missing docstrings
  • replaced UTF-8 arrows with -> to avoid some problem on windows
  • made files (mostly) complient with python linters (tested with prospector -s veryhigh -F -w bandit -w mypy --max-line-length 88)

Merge request reports

Loading