RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Copilot instructions/iloveitaly/llm-ide-rules

Copilot instructions

.github/instructions/python.instructions.md
Copilot instructions

Quality

88/100

Scores the file, not the repository.

Length

436 words

5 headings · 2 code blocks

Repository

13

— · pushed 33 days ago

Last changed

3 days ago

First indexed 3 days ago.
iloveitaly/llm-ide-rules/.github/instructions/python.instructions.mdRawGitHub
1---
2applyTo: "**/*.py"
3---
4## Python
5 
6 
7When writing Python:
8 
9* 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 instructed
14* 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.
29 
30### Package Management
31 
32- Use `uv add` to add python packages. No need for `pip compile`, `pip install`, etc.
33 
34### Typing
35 
36* Assume the latest pyright version
37* 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, ...)`
42 
43### Data Manipulation
44 
45* 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`
48 
49For example, instead of:
50 
51```python
52params: dict[str, str] = {}
53if city:
54 params["city"] = city
55if state_code:
56 params["stateCode"] = state_code
57```
58 
59Use:
60 
61```python
62params = f.compact({"city": city, "stateCode": stateCode})
63```
64 
65### Date & DateTime
66 
67* 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 

Commands it names

  • uv add
  • pip compile
  • pip install

Sections

  • Python
  • Package Management
  • Typing
  • Data Manipulation
  • Date & DateTime

What it covers

setupcode-styletypesdo-not

Stack — with the evidence

python

(1.00)

pytest

(0.70)

ruff

(0.70)

github-actions

(0.60)

Glob targeting

  • **/*.py

Format

Copilot instructions

Two layers: one always-on repo file, plus optional glob-scoped instruction files. Lives under .github/ rather than the repo root, which is the tell that it is aimed at the GitHub platform surface as much as the editor.

What the corpus says about it

Repository

Owner
iloveitaly
Language
—
License
—
Archived
no

All configs in this repo

Also in iloveitaly/llm-ide-rules

Diff this repo’s formats

One 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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
iloveitaly/llm-ide-rules.cursor/rules/python.mdc · 13Cursor rulespythonpytest+2setupstyletypesdo-not88/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/alembic-migrations.mdc · 13Cursor rulespythonpytest+2no sections50/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/fastapi.mdc · 13Cursor rulespythonpytest+2no sections24/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/general.mdc · 13Cursor rulespythonpytest+2teststyledo-notagent-behaviour+192/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/justfiles.mdc · 13Cursor rulespythonpytest+2do-not31/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/pytest-integration-tests.mdc · 13Cursor rulespythonpytest+2teststyletesting-strategy73/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/pytest-tests.mdc · 13Cursor rulespythonpytest+2testarchtesting-strategyapi+161/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/python-app.mdc · 13Cursor rulespythonpytest+2styledatabasedocs61/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/python-route-tests.mdc · 13Cursor rulespythonpytest+2api24/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/react-router.mdc · 13Cursor rulespythonpytest+2testing-strategy57/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/react.mdc · 13Cursor rulespythonpytest+2styletesting-strategyuido-not60/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/shell.mdc · 13Cursor rulespythonpytest+2no sections4/1003 days ago
iloveitaly/llm-ide-rules.cursor/rules/typescript.mdc · 13Cursor rulespythonpytest+2styletypessecurity63/1003 days ago
iloveitaly/llm-ide-rules.github/copilot-instructions.md · 13Copilot instructionspythonpytest+2teststyledo-notagent-behaviour+192/1003 days ago
iloveitaly/llm-ide-rules.github/instructions/alembic-migrations.instructions.md · 13Copilot instructionspythonpytest+2no sections50/1003 days ago
iloveitaly/llm-ide-rules.github/instructions/fastapi.instructions.md · 13Copilot instructionspythonpytest+2no sections16/1003 days ago
iloveitaly/llm-ide-rules.github/instructions/justfiles.instructions.md · 13Copilot instructionspythonpytest+2do-not31/1003 days ago
iloveitaly/llm-ide-rules.github/instructions/pytest-integration-tests.instructions.md · 13Copilot instructionspythonpytest+2teststyletesting-strategy65/1003 days ago
iloveitaly/llm-ide-rules.github/instructions/pytest-tests.instructions.md · 13Copilot instructionspythonpytest+2testarchtesting-strategyapi+153/1003 days ago
iloveitaly/llm-ide-rules.github/instructions/python-app.instructions.md · 13Copilot instructionspythonpytest+2styledatabasedocs61/1003 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.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
pytorch/pytorch.github/copilot-instructions.md · 102kCopilot instructionspythonpytorch+4setupbuildteststyle+5100/1003 days ago
hiyouga/LlamaFactory.github/copilot-instructions.md · 74kCopilot instructionspythontransformers+4setupbuildtestlint-format+597/1002 days ago
darkmatter/nixmac.github/copilot-instructions.md · 24Copilot instructionstypescriptrust+14setupbuildtestlint-format+896/1003 days ago
iloveitaly/llm-ide-rules.github/copilot-instructions.md · 13Copilot instructionspythonpytest+2teststyledo-notagent-behaviour+192/1003 days ago
bytedance/deer-flow.github/copilot-instructions.md · 79kCopilot instructionstypescriptpython+15setupbuildtestlint-format+689/1003 days ago
Significant-Gravitas/AutoGPT.github/copilot-instructions.md · 186kCopilot instructionspythonnode+19setupbuildtestlint-format+1088/1003 days ago
u9401066/nsforge-mcp.github/copilot-instructions.md · 4Copilot instructionspythonpytest+2setuptestlint-formatgit+285/1003 days ago
dotCMS/core.github/copilot-instructions.md · 950Copilot instructionsjavanode+10setupbuildtestlint-format+1184/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack