Skip to content

Commit 35e51a5

Browse files
Copilotaclark4lifeJibola
authored
Revert "PYTHON-5768 Add AGENTS.md w/copilot instructions" (#2744) (#2754)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aclark4life <72164+aclark4life@users.noreply.github.com> Co-authored-by: Jib <jib.adegunloye@mongodb.com>
1 parent f41dd5c commit 35e51a5

2 files changed

Lines changed: 43 additions & 46 deletions

File tree

.github/copilot-instructions.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
1-
Please see [AGENTS.md](../AGENTS.md).
1+
When reviewing code, focus on:
22

3-
Follow the repository instructions defined in `AGENTS.md` when working in this codebase.
3+
## Security Critical Issues
4+
- Check for hardcoded secrets, API keys, or credentials.
5+
- Check for instances of potential method call injection, dynamic code execution, symbol injection or other code injection vulnerabilities.
6+
7+
## Performance Red Flags
8+
- Spot inefficient loops and algorithmic issues.
9+
- Check for memory leaks and resource cleanup.
10+
11+
## Code Quality Essentials
12+
- Methods should be focused and appropriately sized. If a method is doing too much, suggest refactorings to split it up.
13+
- Use clear, descriptive naming conventions.
14+
- Avoid encapsulation violations and ensure proper separation of concerns.
15+
- All public classes, modules, and methods should have clear documentation in Sphinx format.
16+
17+
## PyMongo-specific Concerns
18+
- Do not review files within `pymongo/synchronous` or files in `test/` that also have a file of the same name in `test/asynchronous` unless the reviewed changes include a `_IS_SYNC` statement. PyMongo generates these files from `pymongo/asynchronous` and `test/asynchronous` using `tools/synchro.py`.
19+
- All asynchronous functions must not call any blocking I/O.
20+
21+
## Review Style
22+
- Be specific and actionable in feedback.
23+
- Explain the "why" behind recommendations.
24+
- Acknowledge good patterns when you see them.
25+
- Ask clarifying questions when code intent is unclear.
26+
27+
Always prioritize security vulnerabilities and performance issues that could impact users.
28+
29+
Always suggest changes to improve readability and testability. For example, this suggestion seeks to make the code more readable, reusable, and testable:
30+
31+
```python
32+
# Instead of:
33+
if user.email and "@" in user.email and len(user.email) > 5:
34+
submit_button.enabled = True
35+
else:
36+
submit_button.enabled = False
37+
38+
# Consider:
39+
def valid_email(email):
40+
return email and "@" in email and len(email) > 5
41+
42+
43+
submit_button.enabled = valid_email(user.email)
44+
```

AGENTS.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)