Python best practices e styleguide
62%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./skills/backend/python/SKILL.mdConvenções e styleguide para código Python.
SEMPRE usar type hints em todas as assinaturas de função:
from typing import Optional, List, Dict, Any
def process_data(
user_id: int,
data: Dict[str, Any],
optional_param: Optional[str] = None
) -> List[Dict[str, Any]]:
"""Processa dados do usuário."""
return []Quando um módulo tem mais de uma classe, cada classe deve estar em um arquivo separado:
# ❌ ERRADO
utils/validators.py:
- EmailValidator
- PhoneValidator
- URLValidator
# ✅ CORRETO
utils/validators/
├── __init__.py
├── email.py
├── phone.py
└── url.pyblack .isort .flake8 .mypy src/project/
├── src/
│ ├── app/
│ │ ├── __init__.py
│ │ ├── main.py
│ │ └── modules/
│ └── tests/
├── requirements/
│ ├── base.txt
│ ├── dev.txt
│ └── prod.txt
└── pyproject.tomlruff check . --fix e ruff format .)f84a77a
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.