Skip to content

Commit d5f7bdd

Browse files
codebydivineclaude
andcommitted
style: Apply ruff formatting and linting fixes across codebase
- Format all Python files with consistent import ordering and quote style - Fix bare except statements and star import issues - Apply consistent spacing and formatting to all markdown files - Ensure all files end with proper newlines - Update code style to match ruff configuration This commit contains only formatting changes with no functional modifications. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f862e10 commit d5f7bdd

38 files changed

+1801
-1896
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ updates:
4343
include: "scope"
4444
labels:
4545
- "dependencies"
46-
- "github-actions"
46+
- "github-actions"

.github/workflows/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This directory contains the continuous integration and deployment workflows for
4646

4747
## Setup Requirements
4848

49-
1. **PyPI Publishing**:
49+
1. **PyPI Publishing**:
5050
- Configure PyPI trusted publishing in your PyPI project settings
5151
- Add the `pypi` environment in GitHub repository settings
5252

@@ -72,4 +72,4 @@ pip install ruff mypy
7272
ruff check .
7373
ruff format --check .
7474
mypy src/thegraph_token_api --ignore-missing-imports
75-
```
75+
```

.github/workflows/badges.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ jobs:
1313
runs-on: ubuntu-latest
1414
permissions:
1515
contents: write
16-
16+
1717
steps:
1818
- uses: actions/checkout@v4
1919

2020
- name: Create badge JSON files
2121
run: |
2222
mkdir -p .github/badges
23-
23+
2424
# Coverage badge (placeholder - will be updated by CI)
2525
echo '{"schemaVersion": 1, "label": "coverage", "message": "90%+", "color": "brightgreen"}' > .github/badges/coverage.json
26-
26+
2727
# Tests badge
2828
echo '{"schemaVersion": 1, "label": "tests", "message": "passing", "color": "brightgreen"}' > .github/badges/tests.json
29-
29+
3030
# Python version badge
31-
echo '{"schemaVersion": 1, "label": "python", "message": "3.13+", "color": "blue"}' > .github/badges/python.json
31+
echo '{"schemaVersion": 1, "label": "python", "message": "3.13+", "color": "blue"}' > .github/badges/python.json

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@ jobs:
145145
uses: actions/upload-artifact@v4
146146
with:
147147
name: dist-packages
148-
path: dist/
148+
path: dist/

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
with:
2424
fail-on-severity: high
2525
allow-licenses: MIT, Apache-2.0, BSD-3-Clause, BSD-2-Clause, ISC, Python-2.0
26-
comment-summary-in-pr: true
26+
comment-summary-in-pr: true

.github/workflows/pypi-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ jobs:
9797
run: >-
9898
gh release upload
9999
'${{ github.ref_name }}' dist/**
100-
--repo '${{ github.repository }}'
100+
--repo '${{ github.repository }}'

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,5 @@ dmypy.json
134134
.pytype/
135135

136136
# Cython cache files
137-
cython_debug/
137+
cython_debug/
138138
.DS_Store

API_REFERENCE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ from token_api import TokenAPI, SwapPrograms, Protocol
3939
async def main():
4040
# Auto-loads from .env file
4141
api = TokenAPI()
42-
42+
4343
# Or provide API key directly
4444
api = TokenAPI(api_key="your_api_key_here")
4545

@@ -646,7 +646,7 @@ polygon_history = await api.evm.historical_balances(
646646
},
647647
{
648648
"block_num": 18496400.0,
649-
"datetime": "2023-11-01T11:00:00Z",
649+
"datetime": "2023-11-01T11:00:00Z",
650650
"timestamp": 1698764400.0,
651651
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
652652
"contract": "0x0000000000000000000000000000000000000000",
@@ -959,7 +959,7 @@ for network in networks.networks:
959959
{
960960
"id": "mainnet",
961961
"fullName": "Ethereum Mainnet",
962-
"shortName": "Ethereum",
962+
"shortName": "Ethereum",
963963
"caip2Id": "eip155:1",
964964
"networkType": "mainnet",
965965
"icon": {
@@ -1106,7 +1106,7 @@ except Exception as e:
11061106

11071107
**Common Error Scenarios:**
11081108
- Invalid API key → `ValueError`
1109-
- Invalid address format → `ValueError`
1109+
- Invalid address format → `ValueError`
11101110
- Network timeout → `Exception`
11111111
- Rate limiting → `Exception`
11121112
- Invalid network ID → `ValueError`
@@ -1135,4 +1135,4 @@ Monitor your usage and implement appropriate rate limiting in your application.
11351135
- **Documentation**: [API Reference](API_REFERENCE.md)
11361136
- **Examples**: See `examples/` directory
11371137
- **Issues**: Report bugs and feature requests on GitHub
1138-
- **API Key**: Get yours at [thegraph.market](https://thegraph.market) (click "Get API Key")
1138+
- **API Key**: Get yours at [thegraph.market](https://thegraph.market) (click "Get API Key")

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ from token_api import TokenAPI, SwapPrograms, Protocol
2020

2121
async def main():
2222
api = TokenAPI() # Auto-loads from .env
23-
23+
2424
# EVM chains (Ethereum, Polygon, BSC, etc.)
2525
eth_balances = await api.evm.balances("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")
2626
eth_nfts = await api.evm.nfts.ownerships("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")
2727
eth_swaps = await api.evm.swaps(protocol=Protocol.UNISWAP_V3, limit=10)
28-
28+
2929
# SVM (Solana)
3030
sol_balances = await api.svm.balances(mint="So11111111111111111111111111111111111111112")
3131
sol_swaps = await api.svm.swaps(program_id=SwapPrograms.RAYDIUM, limit=10)
32-
32+
3333
# Utility
3434
health = await api.health()
3535

@@ -48,7 +48,7 @@ Get your free API key at: [thegraph.market](https://thegraph.market) (click "Get
4848
## Features
4949

5050
- 🏗️ **Clean Architecture**: Separated EVM and SVM interfaces
51-
- 🎨 **Nested Organization**: `api.evm.nfts.ownerships()` for better structure
51+
- 🎨 **Nested Organization**: `api.evm.nfts.ownerships()` for better structure
5252
-**Multi-Chain**: Ethereum, Polygon, BSC, Arbitrum, Optimism, Base, Solana
5353
- 🔧 **Time Filtering**: Get trades from specific time ranges
5454
- 📦 **Type Safety**: Full type hints and runtime validation
@@ -62,7 +62,7 @@ Get your free API key at: [thegraph.market](https://thegraph.market) (click "Get
6262
# Token Balances
6363
balances = await api.evm.balances(address)
6464

65-
# NFT Operations
65+
# NFT Operations
6666
nfts = await api.evm.nfts.ownerships(address)
6767
collection = await api.evm.nfts.collection(contract)
6868
activities = await api.evm.nfts.activities(contract)
@@ -105,7 +105,7 @@ swaps = await api.svm.swaps(
105105

106106
## Supported Networks
107107

108-
**EVM**: Ethereum, Polygon, BSC, Arbitrum, Optimism, Avalanche, Base, Unichain
108+
**EVM**: Ethereum, Polygon, BSC, Arbitrum, Optimism, Avalanche, Base, Unichain
109109
**SVM**: Solana
110110

111111
**DEX Protocols**: Uniswap V2/V3, Raydium, Orca, Jupiter, Pump.fun
@@ -120,7 +120,7 @@ python examples/endpoints/evm/health.py # API connectivity
120120
python examples/endpoints/evm/balances.py # Token balances
121121
python examples/endpoints/evm/nfts.py # NFT ownership
122122

123-
# SVM examples
123+
# SVM examples
124124
python examples/endpoints/svm/balances.py # SPL balances
125125
python examples/endpoints/svm/swaps.py # Solana DEX swaps
126126
```
@@ -133,7 +133,7 @@ python examples/endpoints/svm/swaps.py # Solana DEX swaps
133133

134134
The API reference includes:
135135
- All function signatures and parameters
136-
- Response schemas and examples
136+
- Response schemas and examples
137137
- Error handling guidelines
138138
- Type definitions and enums
139139
- Advanced usage patterns
@@ -147,4 +147,4 @@ The API reference includes:
147147

148148
## License
149149

150-
MIT License - see [LICENSE](LICENSE) for details.
150+
MIT License - see [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)