fix(linting): corrige errores de formato y sintaxis detectados por pre-commit

- Elimina import duplicado de DeletionRequestViewSet en urls.py (F811)
- Aplica formato automático con ruff format a 12 archivos Python
- Agrega comas finales faltantes (COM812) en 74 ubicaciones
- Normaliza formato de dependencias en pyproject.toml
- Corrige ortografía en archivos de documentación (codespell)

Errores corregidos:
- src/paperless/urls.py: Import duplicado de DeletionRequestViewSet
- 74 violaciones de COM812 (comas finales faltantes)
- Formato inconsistente en múltiples archivos Python

Este commit asegura que el código pase el linting check de pre-commit
y resuelve los problemas de formato introducidos en el commit anterior.

Archivos Python reformateados: 12
Archivos de documentación corregidos: 35
Comas finales agregadas: 74
This commit is contained in:
Claude 2025-11-17 19:17:49 +00:00
parent 69326b883d
commit e7b426caf1
No known key found for this signature in database
80 changed files with 1823 additions and 1413 deletions

View file

@ -278,9 +278,9 @@ async function getAISuggestions(documentId: number): Promise<AISuggestions> {
// Apply a suggestion
async function applySuggestion(
documentId: number,
type: string,
valueId: number,
documentId: number,
type: string,
valueId: number,
confidence: number
): Promise<void> {
await axios.post(`${API_BASE}/${documentId}/apply-suggestion/`, {
@ -292,9 +292,9 @@ async function applySuggestion(
// Reject a suggestion
async function rejectSuggestion(
documentId: number,
type: string,
valueId: number,
documentId: number,
type: string,
valueId: number,
confidence: number
): Promise<void> {
await axios.post(`${API_BASE}/${documentId}/reject-suggestion/`, {
@ -315,21 +315,21 @@ async function handleDocument(documentId: number) {
try {
// Get suggestions
const suggestions = await getAISuggestions(documentId);
// Show suggestions to user
if (suggestions.tags) {
suggestions.tags.forEach(tag => {
console.log(`Suggested tag: ${tag.name} (${tag.confidence * 100}%)`);
});
}
// User accepts a tag suggestion
if (suggestions.tags && suggestions.tags.length > 0) {
const tag = suggestions.tags[0];
await applySuggestion(documentId, 'tag', tag.id, tag.confidence);
console.log('Tag applied successfully');
}
} catch (error) {
console.error('Error handling AI suggestions:', error);
}