mirror of
https://github.com/arc53/DocsGPT.git
synced 2026-02-26 22:31:02 +00:00
Linter fixes
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
# Allow lines to be as long as 120 characters.
|
||||
line-length = 120
|
||||
line-length = 120
|
||||
|
||||
[lint.per-file-ignores]
|
||||
# Integration tests use sys.path.insert() before imports for standalone execution
|
||||
"tests/integration/*.py" = ["E402"]
|
||||
@@ -11,7 +11,6 @@ This module provides:
|
||||
import argparse
|
||||
import json as json_module
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any, Iterator, Optional, Type, TypeVar
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ _ROOT_DIR = _TESTS_DIR.parent
|
||||
if str(_ROOT_DIR) not in sys.path:
|
||||
sys.path.insert(0, str(_ROOT_DIR))
|
||||
|
||||
from tests.integration.base import Colors, DocsGPTTestBase, generate_jwt_token
|
||||
from tests.integration.base import Colors, generate_jwt_token
|
||||
from tests.integration.test_chat import ChatTests
|
||||
from tests.integration.test_sources import SourceTests
|
||||
from tests.integration.test_agents import AgentTests
|
||||
|
||||
@@ -408,7 +408,7 @@ class ConversationTests(DocsGPTTestBase):
|
||||
|
||||
if response.status_code == 200:
|
||||
result = response.json()
|
||||
self.print_success(f"Retrieved shared conversation")
|
||||
self.print_success("Retrieved shared conversation")
|
||||
self.print_info(f"Messages: {len(result.get('queries', []))}")
|
||||
self.record_result(test_name, True, f"Share ID: {share_id}")
|
||||
return True
|
||||
|
||||
@@ -232,7 +232,7 @@ class MiscTests(DocsGPTTestBase):
|
||||
)
|
||||
|
||||
if response.status_code in [200, 201]:
|
||||
result = response.json()
|
||||
response.json() # Validate JSON response
|
||||
self.print_success("Large attachment stored")
|
||||
self.record_result(test_name, True, "Attachment stored")
|
||||
return True
|
||||
|
||||
@@ -524,7 +524,7 @@ Created at: {int(time.time())}
|
||||
self.print_info(f"Status Code: {response.status_code}")
|
||||
|
||||
if response.status_code == 200:
|
||||
result = response.json()
|
||||
response.json() # Validate JSON response
|
||||
self.print_success("Directory structure retrieved")
|
||||
self.record_result(test_name, True, "Success")
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user