Skip to content

Setup: Coding Conventions and Formatting Rules #7

@systemzerodev

Description

@systemzerodev

Add Coding Conventions and Formatting Rules

Define coding conventions and formatting rules for the RenPy Translator project to ensure code consistency and maintainability.

Consistent formatting improves readability and reduces unnecessary style discussions during development.


Tools

The project will use the following tools:

  • Black – automatic code formatter
  • Ruff – fast Python linter
  • isort – import sorting

Tasks

  • Add formatting tools to requirements.txt
  • Create configuration for Black
  • Configure Ruff for linting
  • Configure isort for import ordering
  • Document coding conventions in README

Formatting Rules

General conventions:

  • Use Black default formatting
  • Maximum line length: 88 characters
  • Use snake_case for variables and functions
  • Use PascalCase for classes
  • Keep functions small and readable

Example:

def extract_dialogues(file_path: str) -> list:
    """Extract dialogue lines from a Ren'Py script file."""
    pass

Goal

Ensure all code in the repository follows a consistent style and is automatically formatted.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions