UNPKG

@cspell/dict-python

Version:
83 lines (82 loc) 2.87 kB
{ "id": "python", "version": "0.2", "readonly": true, "name": "Python", "description": "Python Keyword Dictionary", "dictionaryDefinitions": [ { "name": "python", "path": "./dict/python.txt", "description": "Python Dictionary" }, { "name": "python-common", "path": "./dict/python-common.txt", "description": "Python Common Terms Dictionary" } ], "import": ["@cspell/dict-data-science"], "dictionaries": [], "languageSettings": [ { "languageId": "python", "dictionaries": ["python", "python-common"], "ignoreRegExpList": ["ignore_string_literal_prefix"], "patterns": [ { // Pattern to be ignored "name": "ignore_string_literal_prefix", "pattern": "/\\b(?:rf|fr|f|r|u|ur|b|br)'/gi" }, { "name": "string_binary", "pattern": "/\\bbr?(['\"]).*?\\1/gi" }, { "name": "string_raw", "pattern": "/\\bu?r(['\"]).*?\\1/gi" }, // Redefine the "strings" and "comments" pattern to match Python { "name": "string-multi-line", "pattern": "/(\"\"\"|''')[^\\1]*?\\1/g" }, { "name": "string-single-line", "pattern": "/((?<!\\\\)(?:'|\"))(?!\\1).*?(?<!\\1)(?<!\\\\)\\1(?!\\1)/g" }, { "name": "strings", "description": "Matches all strings in a Python File.", "pattern": [ "/((?<!\\\\)(?:'|\"))(?!\\1).*?(?<!\\1)(?<!\\\\)\\1(?!\\1)/g", // Single line string "/(\"\"\"|''')[^\\1]*?\\1/g" // Multi-line string ] }, { "name": "comment-single-line", "pattern": "/#.*/g" }, { "name": "comment-multi-line", "pattern": "/(\"\"\"|''')[^\\1]*?\\1/g" }, { "name": "comments", "description": "Matches all comments in a Python File.", "pattern": [ "/#.*/g", // Single line comment "/(\"\"\"|''')[^\\1]*?\\1/g" // Multi line comment using multi-line string ] } ] } ], "overrides": [ { "filename": "**/constraints.txt", "dictionaries": ["python", "python-common"] } ] }