You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add clickable transaction links and Python style guidelines (#15)
* feat: Add clickable transaction links to Slack notifications
- Enhanced Slack notifications to show clickable transaction hashes
- Modified blockchain_client to return full block explorer URLs instead of raw hashes
- Updated both success and failure notifications with defensive error handling
- Added production-ready error handling for transaction link formatting
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* docs: Add Python style guidelines and integrate with Claude
- Created comprehensive Python style guidelines document (STYLE_GUIDELINES.md)
- Defined 9 core style principles for consistent code formatting
- Integrated style guidelines into CLAUDE.md for AI coding consistency
- Added guidance for comment placement, spacing, and function separation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* style: Fix linting issues and apply code formatting
- Fix line length violations in slack_notifier.py comments
- Apply automated formatting via ruff and custom formatter
- Ensure all code passes CI linting requirements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* test: Update Slack notification test for clickable link format
- Fix test expectation to match new clickable link format: <url|hash>
- Add style guideline for compressing long comments vs truncating
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
This document defines the coding style guidelines for Python code in this repository. These guidelines should be followed to maintain consistency and readability across the codebase.
4
+
5
+
## Core Style Guidelines
6
+
7
+
### 1. Comments Before Logical Blocks
8
+
Add descriptive comments above logical blocks when the purpose needs clarification or when explaining complex operations and error handling.
9
+
10
+
### 2. Blank Lines Before Comments (Except After Docstrings)
11
+
Include a blank line before each comment that is before a logical block, except when the comment directly follows a function's docstring.
12
+
13
+
### 3. Blank Lines After Logical Sections Complete
14
+
After a logical block completes (end of loops, after appending to lists, etc.), include a blank line before the next comment/section. This helps improve readability of the code.
15
+
16
+
### 4. Comments Describe "What" Not "How"
17
+
Comments should describe what the code accomplishes rather than implementation details.
18
+
19
+
### 5. Spacing Within Control Structures
20
+
Inside try/except blocks and if/else statements, include a blank line after each branch's code block completes.
21
+
22
+
### 6. Comments for Primary and Fallback Logic
23
+
Both the main execution path and fallback/error handling should have descriptive comments when their purpose isn't immediately self-evident.
24
+
25
+
### 7. Comments for Final Actions
26
+
Simple operations at the end of functions should have descriptive comments when the purpose needs clarification.
27
+
28
+
### 8. Two Blank Lines Between Functions/Methods/Classes
29
+
Two blank lines before all function/method/class definitions, whether top-level or nested.
30
+
31
+
### 9. Compress long comments, don't truncate
32
+
When comments exceed the 115-character line limit, compress them by removing unnecessary articles and prepositions while preserving full meaning, rather than truncating important information.
33
+
34
+
### 10. Code clarity not guideline following perfection
35
+
The code is more important than the style guidelines
36
+
37
+
## Integration with Code Formatting Tools
38
+
39
+
These style guidelines work in conjunction with automated formatting tools:
40
+
41
+
-**Ruff**: Handles basic formatting, import sorting, and linting
42
+
-**Custom formatter**: Applies additional spacing rules via `scripts/ruff_check_format_assets.sh`
43
+
44
+
Always run the formatting script before committing:
0 commit comments