chore: import upstream snapshot with attribution
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 11:55:55 +08:00
commit d48cda4081
3322 changed files with 668744 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
---
paths:
- "**/*.py"
- "**/*.pyi"
---
# Estilo de Código en Python
> Este archivo extiende [common/coding-style.md](../common/coding-style.md) con contenido específico de Python.
## Estándares
- Seguir las convenciones de **PEP 8**
- Usar **anotaciones de tipos** en todas las firmas de funciones
## Inmutabilidad
Preferir estructuras de datos inmutables:
```python
from dataclasses import dataclass
@dataclass(frozen=True)
class User:
name: str
email: str
from typing import NamedTuple
class Point(NamedTuple):
x: float
y: float
```
## Formateo
- **black** para formateo de código
- **isort** para ordenamiento de imports
- **ruff** para linting
## Referencia
Ver skill: `python-patterns` para idiomas y patrones completos de Python.
+19
View File
@@ -0,0 +1,19 @@
---
paths:
- "**/*.py"
- "**/*.pyi"
---
# Hooks de Python
> Este archivo extiende [common/hooks.md](../common/hooks.md) con contenido específico de Python.
## Hooks PostToolUse
Configurar en `~/.claude/settings.json`:
- **black/ruff**: Auto-formatear archivos `.py` después de editar
- **mypy/pyright**: Ejecutar verificación de tipos después de editar archivos `.py`
## Advertencias
- Advertir sobre sentencias `print()` en los archivos editados (usar el módulo `logging` en su lugar)
+39
View File
@@ -0,0 +1,39 @@
---
paths:
- "**/*.py"
- "**/*.pyi"
---
# Patrones de Python
> Este archivo extiende [common/patterns.md](../common/patterns.md) con contenido específico de Python.
## Protocol (Duck Typing)
```python
from typing import Protocol
class Repository(Protocol):
def find_by_id(self, id: str) -> dict | None: ...
def save(self, entity: dict) -> dict: ...
```
## Dataclasses como DTOs
```python
from dataclasses import dataclass
@dataclass
class CreateUserRequest:
name: str
email: str
age: int | None = None
```
## Context Managers y Generadores
- Usar context managers (sentencia `with`) para gestión de recursos
- Usar generadores para evaluación lazy e iteración eficiente en memoria
## Referencia
Ver skill: `python-patterns` para patrones completos incluyendo decoradores, concurrencia y organización de paquetes.
+30
View File
@@ -0,0 +1,30 @@
---
paths:
- "**/*.py"
- "**/*.pyi"
---
# Seguridad en Python
> Este archivo extiende [common/security.md](../common/security.md) con contenido específico de Python.
## Gestión de Secretos
```python
import os
from dotenv import load_dotenv
load_dotenv()
api_key = os.environ["OPENAI_API_KEY"] # Lanza KeyError si falta
```
## Escaneo de Seguridad
- Usar **bandit** para análisis estático de seguridad:
```bash
bandit -r src/
```
## Referencia
Ver skill: `django-security` para directrices de seguridad específicas de Django (si aplica).
+38
View File
@@ -0,0 +1,38 @@
---
paths:
- "**/*.py"
- "**/*.pyi"
---
# Pruebas en Python
> Este archivo extiende [common/testing.md](../common/testing.md) con contenido específico de Python.
## Framework
Usar **pytest** como framework de pruebas.
## Cobertura
```bash
pytest --cov=src --cov-report=term-missing
```
## Organización de Pruebas
Usar `pytest.mark` para categorización de pruebas:
```python
import pytest
@pytest.mark.unit
def test_calculate_total():
...
@pytest.mark.integration
def test_database_connection():
...
```
## Referencia
Ver skill: `python-testing` para patrones detallados de pytest y fixtures.