@cspell/dict-python 1.0.38 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,6 +31,10 @@ The `cspell-ext.json` file in this package should be added to the import section
31
31
  }
32
32
  ```
33
33
 
34
+ ## Requirements
35
+
36
+ Requires `cspell >= 5.5.0`
37
+
34
38
  ## Building
35
39
 
36
40
  Building is only necessary if you want to modify the contents of the dictionary. Note: Building will take a few minutes for large files.
package/cspell-ext.json CHANGED
@@ -25,25 +25,22 @@
25
25
  // Apply settings
26
26
  "allowCompoundWords": true,
27
27
  "dictionaries": ["python"],
28
- "ignoreRegExpList": ["binary_string", "f_string", "unicode_string", "raw_string"],
28
+ "ignoreRegExpList": ["ignore_string_literal_prefix"],
29
29
  "patterns": [
30
- // Patterns to be ignored
31
30
  {
32
- "name": "binary_string",
33
- "pattern": "\\bb'"
31
+ // Pattern to be ignored
32
+ "name": "ignore_string_literal_prefix",
33
+ "pattern": "/\\b(?:rf|fr|f|r|u|ur|b|br)'/gi"
34
34
  },
35
35
  {
36
- "name": "f_string",
37
- "pattern": "\\b(?:rf|fr|f)'"
36
+ "name": "string_binary",
37
+ "pattern": "/\\bbr?(['\"]).*?\\1/gi"
38
38
  },
39
39
  {
40
- "name": "unicode_string",
41
- "pattern": "\\bu'"
42
- },
43
- {
44
- "name": "raw_string",
45
- "pattern": "\\bu?r'"
40
+ "name": "string_raw",
41
+ "pattern": "/\\bu?r(['\"]).*?\\1/gi"
46
42
  },
43
+ // Redefine the "strings" and "comments" pattern to match Python
47
44
  {
48
45
  "name": "string-multi-line",
49
46
  "pattern": "/(\"\"\"|''')[^\\1]*?\\1/g"
@@ -52,9 +49,9 @@
52
49
  "name": "string-single-line",
53
50
  "pattern": "/((?<!\\\\)(?:'|\"))(?!\\1).*?(?<!\\1)(?<!\\\\)\\1(?!\\1)/g"
54
51
  },
55
- // Redefine the "strings" and "comments" pattern to match Python
56
52
  {
57
53
  "name": "strings",
54
+ "description": "Matches all strings in a Python File.",
58
55
  "pattern": [
59
56
  "/((?<!\\\\)(?:'|\"))(?!\\1).*?(?<!\\1)(?<!\\\\)\\1(?!\\1)/g", // Single line string
60
57
  "/(\"\"\"|''')[^\\1]*?\\1/g" // Multi-line string
@@ -70,6 +67,7 @@
70
67
  },
71
68
  {
72
69
  "name": "comments",
70
+ "description": "Matches all comments in a Python File.",
73
71
  "pattern": [
74
72
  "/#.*/g", // Single line comment
75
73
  "/(\"\"\"|''')[^\\1]*?\\1/g" // Multi line comment using multi-line string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cspell/dict-python",
3
- "version": "1.0.38",
3
+ "version": "2.0.4",
4
4
  "description": "Python dictionary for cspell.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,6 +24,7 @@
24
24
  },
25
25
  "keywords": [
26
26
  "cspell",
27
+ "cspell-ext",
27
28
  "python",
28
29
  "Python",
29
30
  "dictionary",
@@ -39,5 +40,5 @@
39
40
  "python.txt.gz",
40
41
  "cspell-ext.json"
41
42
  ],
42
- "gitHead": "dafe37d7e9deea73d37a586bf793aaba2ac699f7"
43
+ "gitHead": "b1fe09d226f849c6c1b3ae70fa2da0a3adb3f920"
43
44
  }
package/python.txt.gz CHANGED
Binary file