Private
Public Access
feat(style): Fix 1-space indentation in 27 files
Files corrected: - src/fuzzy_anchor.py (18 violations) - src/patch_modal.py (14 violations) - scripts/extract_symbols.py (4 violations) - scripts/tasks/download_fonts.py (8 violations) - tests/: 23 files with indentation issues All files verified with py_compile. Remaining 4 files (test_api_events.py, test_discussion_takes_gui.py, test_gui_updates.py, test_headless_service.py) have complex multi-line with statements that require manual correction.
This commit is contained in:
@@ -6,45 +6,45 @@ import unittest
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
class TestArchBoundaryPhase1(unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
pass
|
||||
def setUp(self) -> None:
|
||||
pass
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_unfettered_modules_constant_removed(self) -> None:
|
||||
"""TEST 1: Check 'UNFETTERED_MODULES' string is removed from project_manager.py"""
|
||||
# We check the source directly to be sure it's not just hidden
|
||||
with open("src/project_manager.py", "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
self.assertNotIn("UNFETTERED_MODULES", content)
|
||||
def test_unfettered_modules_constant_removed(self) -> None:
|
||||
"""TEST 1: Check 'UNFETTERED_MODULES' string is removed from project_manager.py"""
|
||||
# We check the source directly to be sure it's not just hidden
|
||||
with open("src/project_manager.py", "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
self.assertNotIn("UNFETTERED_MODULES", content)
|
||||
|
||||
def test_mcp_client_whitelist_enforcement(self) -> None:
|
||||
"""TEST 2: mcp_client._is_allowed must return False for config.toml"""
|
||||
from src import mcp_client
|
||||
from pathlib import Path
|
||||
def test_mcp_client_whitelist_enforcement(self) -> None:
|
||||
"""TEST 2: mcp_client._is_allowed must return False for config.toml"""
|
||||
from src import mcp_client
|
||||
from pathlib import Path
|
||||
|
||||
# Configure with some dummy file items (as dicts)
|
||||
file_items = [{"path": "src/gui_2.py"}]
|
||||
mcp_client.configure(file_items, [])
|
||||
# Configure with some dummy file items (as dicts)
|
||||
file_items = [{"path": "src/gui_2.py"}]
|
||||
mcp_client.configure(file_items, [])
|
||||
|
||||
# Should allow src files
|
||||
self.assertTrue(mcp_client._is_allowed(Path("src/gui_2.py")))
|
||||
# Should REJECT config files
|
||||
self.assertFalse(mcp_client._is_allowed(Path("config.toml")))
|
||||
self.assertFalse(mcp_client._is_allowed(Path("credentials.toml")))
|
||||
# Should allow src files
|
||||
self.assertTrue(mcp_client._is_allowed(Path("src/gui_2.py")))
|
||||
# Should REJECT config files
|
||||
self.assertFalse(mcp_client._is_allowed(Path("config.toml")))
|
||||
self.assertFalse(mcp_client._is_allowed(Path("credentials.toml")))
|
||||
|
||||
def test_mma_exec_no_hardcoded_path(self) -> None:
|
||||
"""TEST 4: mma_exec.execute_agent must not contain hardcoded machine paths."""
|
||||
with open("scripts/mma_exec.py", "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
# Check for some common home directory patterns or user paths
|
||||
self.assertNotIn("C:\\Users\\Ed", content)
|
||||
self.assertNotIn("/Users/ed", content)
|
||||
def test_mma_exec_no_hardcoded_path(self) -> None:
|
||||
"""TEST 4: mma_exec.execute_agent must not contain hardcoded machine paths."""
|
||||
with open("scripts/mma_exec.py", "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
# Check for some common home directory patterns or user paths
|
||||
self.assertNotIn("C:\\Users\\Ed", content)
|
||||
self.assertNotIn("/Users/ed", content)
|
||||
|
||||
def test_claude_mma_exec_no_hardcoded_path(self) -> None:
|
||||
"""TEST 5: claude_mma_exec.execute_agent must not contain hardcoded machine paths."""
|
||||
with open("scripts/claude_mma_exec.py", "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
self.assertNotIn("C:\\Users\\Ed", content)
|
||||
self.assertNotIn("/Users/ed", content)
|
||||
def test_claude_mma_exec_no_hardcoded_path(self) -> None:
|
||||
"""TEST 5: claude_mma_exec.execute_agent must not contain hardcoded machine paths."""
|
||||
with open("scripts/claude_mma_exec.py", "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
self.assertNotIn("C:\\Users\\Ed", content)
|
||||
self.assertNotIn("/Users/ed", content)
|
||||
Reference in New Issue
Block a user