Skip to content

Commit f777d1b

Browse files
committed
ai(rules[AGENTS]): Clarify namespace imports for stdlib only
1 parent e63ebc7 commit f777d1b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

AGENTS.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ Example format:
126126
127127
### Imports
128128
129-
**For standard library modules:**
130-
- Use namespace imports: `import enum` instead of `from enum import Enum`
129+
- Use namespace imports for stdlib: `import enum` instead of `from enum import Enum`; third-party packages may use `from X import Y`
131130
- For typing, use `import typing as t` and access via namespace: `t.NamedTuple`, etc.
132131

133132
**For third-party packages:** Use idiomatic import styles for each library (e.g., `from pygments.token import Token` is fine).

0 commit comments

Comments
 (0)