- Python ecosystem में lint, formatter, type checker, coverage tools द्वारा इस्तेमाल किए जाने वाले special comments (action comments) को एक ही standard में unify करने के लिए प्रस्तावित library
# noqa, # fmt: off, # type: ignore जैसे व्यवहार में प्रचलित लेकिन बिना किसी standard वाले comment syntax की उलझन को हल करना इसका उद्देश्य है
- Python syntax के subset का उपयोग करने वाली lightweight annotation language (metacode) परिभाषित करता है
key: action[arguments] रूप में tool, action, arguments को स्पष्ट रूप से अलग करता है
- एक ही code line पर कई tools के comments को सुरक्षित रूप से साथ मौजूद रहने देने वाली संरचना का समर्थन
# type: ignore # fmt: off जैसे संयोजन को संभाल सकता है
- comments parsing के लिए official parser (
parse) प्रदान करता है, जिससे हर tool द्वारा अलग-अलग implement की जाने वाली string/regex parsing logic हट जाती है
- argument types के रूप में string, number, bool, None, ellipsis आदि का समर्थन, और जरूरत पड़ने पर AST-आधारित extended parsing भी संभव
- केवल खास key को selectively parse किया जा सकता है, इसलिए tool-wise comment separation processing के लिए उपयुक्त
- comments को अपने-आप generate और insert करने के लिए insert API प्रदान करता है
- syntax खुद Python पर निर्भर न रहे, इसके लिए इसे EBNF रूप में specify किया गया है, इसलिए दूसरी languages में implementation भी संभव है
अभी कोई टिप्पणी नहीं है.