← 전체로 돌아가기
스킬 python

pylance strict

pylance strict 모드 설정, 타입 체크 빡세게 함

pylancevscodepythontype-checkingsettings

pylance strict

Cmd+Shift+P "Preferences: Open Settings (JSON)"

{
    "python.analysis.typeCheckingMode": "strict",
    "python.analysis.autoImportCompletions": true,
    "python.analysis.exclude": ["**/node_modules", "env/**"]
}
  • python.analysis.typeCheckingMode: 타입 체크 레벨 지정 (off, basic, standard, strict)
  • python.analysis.exclude: 무시할 파일/폴더 설정 (e.g., .venv, build)
  • python.analysis.diagnosticMode: 모든 파일 or 열린 파일만 분석할지 정함
  • python.analysis.extraPaths: 커스텀 import 디렉토리 추가

여기서 배울 것

  1. pylance strict 모드로 타입 체크 강화 가능
  2. `exclude`로 불필요한 폴더 타입 체크에서 제외함
  3. `diagnosticMode`로 분석 범위 조절
  4. `extraPaths`로 import 경로 커스텀
원본 파일 보기 (.claude/skills/tn-pylance-strict/SKILL.md)
---
name: Pylance Strict Mode 설정
description: This skill should be used when the user asks to configure Pylance for strict type checking in VS Code, or to adjust Pylance settings such as `exclude` paths or `autoImportCompletions`.
version: 1.0.0
source: /home/son/prj/resume/backup_notes_260317/notion/Tech Note/pylance strict 2f4d7efd824b80039222e53e5ab3b42d.md
---

# pylance strict

Cmd+Shift+P

**"Preferences: Open Settings (JSON)"**

```json
{
    "python.analysis.typeCheckingMode": "strict",
    "python.analysis.autoImportCompletions": true,
    "python.analysis.exclude": ["**/node_modules", "env/**"]
}
```

- `python.analysis.typeCheckingMode` - Type checking level (`off`, `basic`, `standard`, `strict`)
- `python.analysis.exclude` - Ignore files/folders (e.g., .venv, `build`)
- `python.analysis.diagnosticMode` - Analyze all files or only open files
- `python.analysis.extraPaths` - Add custom import directories