未翻訳のページ
このページはまだ日本語に翻訳されていないため、英語の原文を表示しています。 翻訳に協力する
tabnanny Module¶
The tabnanny module checks Python source files for mixed tabs and spaces in indentation, which can cause syntax errors.
Complexity Reference¶
| Operation | Time | Space | Notes |
|---|---|---|---|
| Check file/directory | O(n) | O(d) | n = file tokens scanned, d = max indent depth |
Checking Indentation¶
Checking File for Tab Issues¶
import tabnanny
# Check file - O(n)
tabnanny.check('myfile.py') # Prints diagnostics to stdout; returns None
# Or from command line:
# python -m tabnanny myfile.py