Copilot instructions
.github/instructions/python.instructions.mdCopilot instructions
Quality
88/100
Scores the file, not the repository.Length
436 words
5 headings · 2 code blocksRepository
13
— · pushed 33 days agoLast changed
3 days ago
First indexed 3 days ago.1234## Python567When writing Python:89* Assume the latest python, version 3.13.10* Prefer Pathlib methods (including read and write methods, like `read_text`) over `os.path`, `open`, `write`, etc.11* Prefer docstr to multi-line comments at the top of a function or file.12* If a docstr does not span multiple lines, do not use triple-quoted strings.13* Do not create `__init__` files unless specifically instructed14* Use Pydantic models over dataclass or a typed dict.15* Use SQLAlchemy for generating any SQL queries.16* Use `click` for command line argument parsing.17* Use `log.info("the message", the_variable=the_variable)` instead of `log.info("The message: %s", the_variable)` or `print` for logging. This object can be found at `from app import log`.18 * Log messages should be lowercase with no leading or trailing whitespace.19 * No variable interpolation in log messages.20 * Do not coerce database IDs, dates, or Path objects to `str`21* Do not fix import ordering or other linting issues.22* Never edit or create any files in `migrations/versions/`23* Place all comments on dedicated lines immediately above the code statements they describe. Avoid inline comments appended to the end of code lines.24* Do not `try/catch` raw `Exceptions` unless explicitly told to. Prefer to let exceptions raise and cause an explicit error.25* Always make an explicit copy before mutating a dictionary that you did not create in the current narrow scope.26* Never use `from __future__`27* Always use `re.compile(pattern, re.VERBOSE)` and inline `#` comments to document the logic of each capture group or condition in any complex regular expression.28* **IMPORTANT** never edit app/generated/ files. These are autogenerated.2930### Package Management3132- Use `uv add` to add python packages. No need for `pip compile`, `pip install`, etc.3334### Typing3536* Assume the latest pyright version37* Prefer modern typing: `list[str]` over `List[str]`, `dict[str, int]` over `Dict[str, int]`, etc.38* Prefer to keep typing errors in place than eliminate type specificity:39 * Do not add ignore comments such as `# type: ignore`40 * Never add an `Any` type.41 * Do not `cast(object, ...)`4243### Data Manipulation4445* Prefer `funcy` utilities to complex list comprehensions or repetitive python statements.46* `import funcy as f` and `import funcy_pipe as fp`47* Some utilities to look at: `f.compact`4849For example, instead of:5051```python52params: dict[str, str] = {}53if city:54 params["city"] = city55if state_code:56 params["stateCode"] = state_code57```5859Use:6061```python62params = f.compact({"city": city, "stateCode": stateCode})63```6465### Date & DateTime6667* Use the `whenever` library for datetime + time instead of the stdlib date library. `Instant.now().format_iso()`68* DateTime mutation should explicitly opt in to a specific timezone `SystemDateTime.now().add(days=-7)`69
Also in iloveitaly/llm-ide-rules
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| iloveitaly/llm-ide-rules.cursor/rules/python.mdc · 13 | Cursor rules | setupstyletypesdo-not | 88/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/alembic-migrations.mdc · 13 | Cursor rules | no sections | 50/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/fastapi.mdc · 13 | Cursor rules | no sections | 24/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/general.mdc · 13 | Cursor rules | teststyledo-notagent-behaviour+1 | 92/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/justfiles.mdc · 13 | Cursor rules | do-not | 31/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/pytest-integration-tests.mdc · 13 | Cursor rules | teststyletesting-strategy | 73/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/pytest-tests.mdc · 13 | Cursor rules | testarchtesting-strategyapi+1 | 61/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/python-app.mdc · 13 | Cursor rules | styledatabasedocs | 61/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/python-route-tests.mdc · 13 | Cursor rules | api | 24/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/react-router.mdc · 13 | Cursor rules | testing-strategy | 57/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/react.mdc · 13 | Cursor rules | styletesting-strategyuido-not | 60/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/shell.mdc · 13 | Cursor rules | no sections | 4/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/typescript.mdc · 13 | Cursor rules | styletypessecurity | 63/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.github/copilot-instructions.md · 13 | Copilot instructions | teststyledo-notagent-behaviour+1 | 92/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/alembic-migrations.instructions.md · 13 | Copilot instructions | no sections | 50/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/fastapi.instructions.md · 13 | Copilot instructions | no sections | 16/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/justfiles.instructions.md · 13 | Copilot instructions | do-not | 31/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/pytest-integration-tests.instructions.md · 13 | Copilot instructions | teststyletesting-strategy | 65/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/pytest-tests.instructions.md · 13 | Copilot instructions | testarchtesting-strategyapi+1 | 53/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/python-app.instructions.md · 13 | Copilot instructions | styledatabasedocs | 61/100 | 3 days ago |
Diff against .cursor/rules/python.mdc Diff against .cursor/rules/alembic-migrations.mdc Diff against .cursor/rules/fastapi.mdc Diff against .cursor/rules/general.mdc Diff against .cursor/rules/justfiles.mdc Diff against .cursor/rules/pytest-integration-tests.mdc Diff against .cursor/rules/pytest-tests.mdc Diff against .cursor/rules/python-app.mdc Diff against .cursor/rules/python-route-tests.mdc Diff against .cursor/rules/react-router.mdc Diff against .cursor/rules/react.mdc Diff against .cursor/rules/shell.mdc Diff against .cursor/rules/typescript.mdc Diff against .github/copilot-instructions.md Diff against .github/instructions/alembic-migrations.instructions.md Diff against .github/instructions/fastapi.instructions.md Diff against .github/instructions/justfiles.instructions.md Diff against .github/instructions/pytest-integration-tests.instructions.md Diff against .github/instructions/pytest-tests.instructions.md Diff against .github/instructions/python-app.instructions.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| hiyouga/LlamaFactory.github/copilot-instructions.md · 74k | Copilot instructions | setupbuildtestlint-format+5 | 97/100 | 2 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 24 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.github/copilot-instructions.md · 13 | Copilot instructions | teststyledo-notagent-behaviour+1 | 92/100 | 3 days ago | |
| bytedance/deer-flow.github/copilot-instructions.md · 79k | Copilot instructions | setupbuildtestlint-format+6 | 89/100 | 3 days ago | |
| Significant-Gravitas/AutoGPT.github/copilot-instructions.md · 186k | Copilot instructions | setupbuildtestlint-format+10 | 88/100 | 3 days ago | |
| u9401066/nsforge-mcp.github/copilot-instructions.md · 4 | Copilot instructions | setuptestlint-formatgit+2 | 85/100 | 3 days ago | |
| dotCMS/core.github/copilot-instructions.md · 950 | Copilot instructions | setupbuildtestlint-format+11 | 84/100 | 3 days ago |
