Skip to content

chiatsewang/my-python-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Python Project Template

A minimal Python project template with formatting and linting tools.

Setup

  1. Install dependencies with uv:

    uv sync --extra dev
  2. Install pre-commit hooks:

    uv run pre-commit install

    Alternatively, activate the virtual environment:

    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    pre-commit install

Tools

  • Black: Code formatter (line length: 79)
  • Ruff: Fast Python linter
  • Pre-commit: Git hooks for automated checks

Usage

Run Black:

uv run black .

Run Ruff:

uv run ruff check .
uv run ruff check --fix .  # Auto-fix issues

Run pre-commit manually:

uv run pre-commit run --all-files

About

This is a template for python project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors