Skip to content

style: standardize code to CLAUDE.md standards#1

Merged
Redliana merged 7 commits intomainfrom
style/standardize-claude-md
Feb 12, 2026
Merged

style: standardize code to CLAUDE.md standards#1
Redliana merged 7 commits intomainfrom
style/standardize-claude-md

Conversation

@Redliana
Copy link
Owner

Summary

  • Apply ruff format (line-length=100) across all source dirs (src, Claude/cmm_mcp_server, API_Scripts, OSTI_retrieval, Exp_Design, scripts, examples, tests)
  • Auto-fix imports (sorting, unused), modernize type annotations (Dictdict, Optional[X]X | None)
  • Add from __future__ import annotations to all modules
  • Replace ~67 bare except Exception clauses with specific types (requests.RequestException, OSError, ValueError, json.JSONDecodeError, etc.)
  • Fix broken from typing import dict, list imports caused by modernization script
  • Add [tool.mypy] config to Exp_Design/fine_tuning/pyproject.toml; expand ruff ignore list in root pyproject.toml
  • All files pass ruff format --check and ruff check clean

Test plan

  • Verify ruff format --check passes on all source dirs
  • Verify ruff check passes on all source dirs
  • Spot-check exception handling changes in cmm_mcp_server and API_Scripts
  • Confirm no behavioral changes (formatting and lint fixes only)

🤖 Generated with Claude Code

nmwashton and others added 7 commits February 11, 2026 20:18
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Also modernizes typing imports (Dict→dict, List→list, Optional→X|None).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove builtin names (dict, list, tuple, set) from typing imports
  (artifact of modernize_typing.py script bug)
- Auto-fix import sorting and unused imports with ruff
- Apply ruff format for consistent style

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add [tool.mypy] with basic settings to Exp_Design/fine_tuning
- Root pyproject.toml already had ruff and mypy configuration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Expand ruff ignore list for structural patterns
- Add per-file ignores for F401 false positives (availability checks)
- Auto-fix various lint issues in Exp_Design
- All ruff format --check and ruff check now pass clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Redliana Redliana merged commit a0b5481 into main Feb 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants