Skip to content

Commit 5de86c0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b977aa2 commit 5de86c0

3 files changed

Lines changed: 72 additions & 75 deletions

File tree

.github/copilot-instructions.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,30 @@ Welcome to the Cachier codebase! Please follow these guidelines to ensure code s
6161
The repository contains a Python package called Cachier that provides persistent function caching with several backends:
6262

6363
cachier/
64-
├── src/cachier/ # Main library code
65-
├── __init__.py
66-
├── core.py # Decorator logic, backend selection
67-
├── cores/ # Backend implementations
68-
├── pickle.py
69-
├── memory.py
70-
├── mongo.py
71-
├── sql.py
72-
├── redis.py
73-
└── base.py
74-
├── config.py # Global/default config
75-
├── _types.py # Type definitions
76-
├── _version.py
77-
└── __main__.py
78-
├── tests/ # Pytest-based tests, backend-marked
79-
├── test_*.py
80-
└── *_requirements.txt # Backend-specific test requirements
81-
├── examples/ # Usage examples
82-
├── README.rst # Main documentation
64+
├── src/cachier/ # Main library code
65+
│ ├── __init__.py
66+
│ ├── core.py # Decorator logic, backend selection
67+
│ ├── cores/ # Backend implementations
68+
├── pickle.py
69+
├── memory.py
70+
├── mongo.py
71+
├── sql.py
72+
├── redis.py
73+
└── base.py
74+
│ ├── config.py # Global/default config
75+
│ ├── \_types.py # Type definitions
76+
│ ├── _version.py
77+
│ └── __main__.py
78+
├── tests/ # Pytest-based tests, backend-marked
79+
│ ├── test_\*.py
80+
│ └── \*\_requirements.txt # Backend-specific test requirements
81+
├── examples/ # Usage examples
82+
├── README.rst # Main documentation
8383
└── ...
8484

8585
### Key functionality
8686

87-
* core.py exposes the cachier decorator. It chooses a backend (pickle, mongo, memory, SQL, or Redis) and wraps the target function:
87+
- core.py exposes the cachier decorator. It chooses a backend (pickle, mongo, memory, SQL, or Redis) and wraps the target function:
8888

8989
```python
9090
backend = _update_with_defaults(backend, "backend")
@@ -102,7 +102,7 @@ else:
102102
raise ValueError("specified an invalid core: %s" % backend)
103103
```
104104

105-
* Global defaults and cache-entry structures are defined in config.py:
105+
- Global defaults and cache-entry structures are defined in config.py:
106106

107107
```python
108108
@dataclass
@@ -120,7 +120,7 @@ class Params:
120120
allow_none: bool = False
121121
```
122122

123-
* The project supports multiple backends; each resides under src/cachier/cores/ (e.g., redis.py, mongo.py, etc.). The Redis example demonstrates how to use one backend:
123+
- The project supports multiple backends; each resides under src/cachier/cores/ (e.g., redis.py, mongo.py, etc.). The Redis example demonstrates how to use one backend:
124124

125125
```python
126126
import time
@@ -227,9 +227,7 @@ def demo_callable_client():
227227

228228
def get_redis_client():
229229
"""Get a Redis client."""
230-
return redis.Redis(
231-
host="localhost", port=6379, db=0, decode_responses=False
232-
)
230+
return redis.Redis(host="localhost", port=6379, db=0, decode_responses=False)
233231

234232
@cachier(backend="redis", redis_client=get_redis_client)
235233
def cached_with_callable(n):
@@ -300,6 +298,7 @@ def main():
300298
if __name__ == "__main__":
301299
main()
302300
```
301+
303302
______________________________________________________________________
304303

305304
Thank you for contributing to Cachier! These guidelines help ensure a robust, maintainable, and user-friendly package for everyone.

AGENTS.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -159,30 +159,30 @@ ______________________________________________________________________
159159
The repository contains a Python package called Cachier that provides persistent function caching with several backends:
160160

161161
cachier/
162-
├── src/cachier/ # Main library code
163-
├── __init__.py
164-
├── core.py # Decorator logic, backend selection
165-
├── cores/ # Backend implementations
166-
├── pickle.py
167-
├── memory.py
168-
├── mongo.py
169-
├── sql.py
170-
├── redis.py
171-
└── base.py
172-
├── config.py # Global/default config
173-
├── _types.py # Type definitions
174-
├── _version.py
175-
└── __main__.py
176-
├── tests/ # Pytest-based tests, backend-marked
177-
├── test_*.py
178-
└── *_requirements.txt # Backend-specific test requirements
179-
├── examples/ # Usage examples
180-
├── README.rst # Main documentation
162+
├── src/cachier/ # Main library code
163+
│ ├── __init__.py
164+
│ ├── core.py # Decorator logic, backend selection
165+
│ ├── cores/ # Backend implementations
166+
├── pickle.py
167+
├── memory.py
168+
├── mongo.py
169+
├── sql.py
170+
├── redis.py
171+
└── base.py
172+
│ ├── config.py # Global/default config
173+
│ ├── \_types.py # Type definitions
174+
│ ├── _version.py
175+
│ └── __main__.py
176+
├── tests/ # Pytest-based tests, backend-marked
177+
│ ├── test_\*.py
178+
│ └── \*\_requirements.txt # Backend-specific test requirements
179+
├── examples/ # Usage examples
180+
├── README.rst # Main documentation
181181
└── ...
182182

183183
### Key functionality
184184

185-
* core.py exposes the cachier decorator. It chooses a backend (pickle, mongo, memory, SQL, or Redis) and wraps the target function:
185+
- core.py exposes the cachier decorator. It chooses a backend (pickle, mongo, memory, SQL, or Redis) and wraps the target function:
186186

187187
```python
188188
backend = _update_with_defaults(backend, "backend")
@@ -200,7 +200,7 @@ else:
200200
raise ValueError("specified an invalid core: %s" % backend)
201201
```
202202

203-
* Global defaults and cache-entry structures are defined in config.py:
203+
- Global defaults and cache-entry structures are defined in config.py:
204204

205205
```python
206206
@dataclass
@@ -218,7 +218,7 @@ class Params:
218218
allow_none: bool = False
219219
```
220220

221-
* The project supports multiple backends; each resides under src/cachier/cores/ (e.g., redis.py, mongo.py, etc.). The Redis example demonstrates how to use one backend:
221+
- The project supports multiple backends; each resides under src/cachier/cores/ (e.g., redis.py, mongo.py, etc.). The Redis example demonstrates how to use one backend:
222222

223223
```python
224224
import time
@@ -325,9 +325,7 @@ def demo_callable_client():
325325

326326
def get_redis_client():
327327
"""Get a Redis client."""
328-
return redis.Redis(
329-
host="localhost", port=6379, db=0, decode_responses=False
330-
)
328+
return redis.Redis(host="localhost", port=6379, db=0, decode_responses=False)
331329

332330
@cachier(backend="redis", redis_client=get_redis_client)
333331
def cached_with_callable(n):
@@ -398,6 +396,7 @@ def main():
398396
if __name__ == "__main__":
399397
main()
400398
```
399+
401400
______________________________________________________________________
402401

403402
## 🛠️ Common Bash & MCP Commands

CLAUDE.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -159,30 +159,30 @@ ______________________________________________________________________
159159
The repository contains a Python package called Cachier that provides persistent function caching with several backends:
160160

161161
cachier/
162-
├── src/cachier/ # Main library code
163-
├── __init__.py
164-
├── core.py # Decorator logic, backend selection
165-
├── cores/ # Backend implementations
166-
├── pickle.py
167-
├── memory.py
168-
├── mongo.py
169-
├── sql.py
170-
├── redis.py
171-
└── base.py
172-
├── config.py # Global/default config
173-
├── _types.py # Type definitions
174-
├── _version.py
175-
└── __main__.py
176-
├── tests/ # Pytest-based tests, backend-marked
177-
├── test_*.py
178-
└── *_requirements.txt # Backend-specific test requirements
179-
├── examples/ # Usage examples
180-
├── README.rst # Main documentation
162+
├── src/cachier/ # Main library code
163+
│ ├── __init__.py
164+
│ ├── core.py # Decorator logic, backend selection
165+
│ ├── cores/ # Backend implementations
166+
├── pickle.py
167+
├── memory.py
168+
├── mongo.py
169+
├── sql.py
170+
├── redis.py
171+
└── base.py
172+
│ ├── config.py # Global/default config
173+
│ ├── \_types.py # Type definitions
174+
│ ├── _version.py
175+
│ └── __main__.py
176+
├── tests/ # Pytest-based tests, backend-marked
177+
│ ├── test_\*.py
178+
│ └── \*\_requirements.txt # Backend-specific test requirements
179+
├── examples/ # Usage examples
180+
├── README.rst # Main documentation
181181
└── ...
182182

183183
### Key functionality
184184

185-
* core.py exposes the cachier decorator. It chooses a backend (pickle, mongo, memory, SQL, or Redis) and wraps the target function:
185+
- core.py exposes the cachier decorator. It chooses a backend (pickle, mongo, memory, SQL, or Redis) and wraps the target function:
186186

187187
```python
188188
backend = _update_with_defaults(backend, "backend")
@@ -200,7 +200,7 @@ else:
200200
raise ValueError("specified an invalid core: %s" % backend)
201201
```
202202

203-
* Global defaults and cache-entry structures are defined in config.py:
203+
- Global defaults and cache-entry structures are defined in config.py:
204204

205205
```python
206206
@dataclass
@@ -218,7 +218,7 @@ class Params:
218218
allow_none: bool = False
219219
```
220220

221-
* The project supports multiple backends; each resides under src/cachier/cores/ (e.g., redis.py, mongo.py, etc.). The Redis example demonstrates how to use one backend:
221+
- The project supports multiple backends; each resides under src/cachier/cores/ (e.g., redis.py, mongo.py, etc.). The Redis example demonstrates how to use one backend:
222222

223223
```python
224224
import time
@@ -325,9 +325,7 @@ def demo_callable_client():
325325

326326
def get_redis_client():
327327
"""Get a Redis client."""
328-
return redis.Redis(
329-
host="localhost", port=6379, db=0, decode_responses=False
330-
)
328+
return redis.Redis(host="localhost", port=6379, db=0, decode_responses=False)
331329

332330
@cachier(backend="redis", redis_client=get_redis_client)
333331
def cached_with_callable(n):
@@ -398,6 +396,7 @@ def main():
398396
if __name__ == "__main__":
399397
main()
400398
```
399+
401400
______________________________________________________________________
402401

403402
## 🛠️ Common Bash & MCP Commands

0 commit comments

Comments
 (0)