You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

24 lines
729 B

# Import grouping and ordering constraints
rules:
- name: grouping
rule: "Group imports in three sections separated by a single blank line: stdlib, third-party, local."
examples:
- good: |
import json
import logging
import requests
import duckdb
from .pipeline import text_pipeline
- bad: |
import duckdb
import json
from pipeline import text_pipeline
- name: from_imports
rule: "Prefer 'from x import y' only when it improves clarity or avoids circular import; otherwise import module and reference attributes."
enforcement_examples:
- "Run isort or ruff- import sorting in pre-commit or CI to enforce ordering."