Skip to content

Commit 583db92

Browse files
Look at using the original fix prompts
* now that we have a DB, we can use it to build context for running our fix prompts at particular locations in a file.
1 parent e2685db commit 583db92

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

prompts/pylint/7-1-fix.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
tools:
3+
- name: fix-pylint-violation
4+
description: fix a pylint violation
5+
parameters:
6+
type: object
7+
properties:
8+
code:
9+
type: string
10+
description: the code block
11+
violation:
12+
type: string
13+
description: the description of the violation
14+
prompt:
15+
ref: github:docker/labs-ai-tools-for-devs?path=prompts/pylint/fix-violation.md
16+
- name: sqlite
17+
---
18+
19+
# prompt user
20+
21+
I am looking at line 17 of src/app.py.
22+
23+
Find the code and violation at this location.
24+
25+
Now fix the the pylint violation.

prompts/pylint/fix-violation.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
# prompt user
3+
4+
## Original Code
5+
{{code}}
6+
7+
## Pylint Output
8+
{{violation}}
9+
10+
11+
**STRICTLY FOLLOW THE RULES BELOW:**
12+
generate new code which will resolve the violation
13+
Return the response in the following format:
14+
```python
15+
<corrected code>
16+
```
17+

0 commit comments

Comments
 (0)