Skip to content

Commit 0a5d7a7

Browse files
author
Matt Morrison
committed
Merge pull request #29 from MattDMo/master
update work with master (1.4.2)
2 parents d5e704f + 43fabd2 commit 0a5d7a7

File tree

4 files changed

+30
-76
lines changed

4 files changed

+30
-76
lines changed

PythonImproved.YAML-tmLanguage

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ comment: To make PythonImproved your default Python syntax, open a .py file and
44
name: PythonImproved
55
scopeName: source.python
66
fileTypes: [py, py3, rpy, pyw, cpy, SConstruct, Sconstruct, sconstruct, SConscript]
7-
uuid: 0F24FCF1-6543-4CC6-8B33-2EAED401FE3A
7+
uuid: 11B0273F-0284-4483-B17B-4B8D0A9294CC
88

99
patterns:
1010
- name: support.ipython.in.python
@@ -28,7 +28,8 @@ patterns:
2828
captures:
2929
'1': {name: punctuation.definition.comment.python}
3030

31-
- comment: Match identifiers in ALL_CAPS as constants, except when followed by . or (.
31+
- comment: Match identifiers in ALL_CAPS as constants, except when followed by . or
32+
(.
3233
name: constant.other.allcaps.python
3334
match: \b([A-Z_][A-Z0-9_]*)\b(?![\.\(])
3435

@@ -360,7 +361,12 @@ patterns:
360361

361362
- include: '#dotted_name'
362363

363-
- match: \b(\[)(\s*(\]))\b
364+
- begin: (\()
365+
end: (\))
366+
patterns:
367+
- include: $self
368+
369+
- match: (\[)(\s*(\]))\b
364370
captures:
365371
'1': {name: punctuation.definition.list.begin.python}
366372
'2': {name: meta.empty-list.python}
@@ -389,22 +395,6 @@ patterns:
389395
'2': {name: meta.empty-tuple.python}
390396
'3': {name: punctuation.definition.tuple.end.python}
391397

392-
- name: meta.structure.tuple.python
393-
begin: \b(\()
394-
beginCaptures:
395-
'1': {name: punctuation.definition.tuple.begin.python}
396-
end: (\))\b
397-
endCaptures:
398-
'1': {name: punctuation.definition.tuple.end.python}
399-
patterns:
400-
- contentName: meta.structure.tuple.item.python
401-
begin: (?<=\(|\,)\s*(?![\),])
402-
end: \s*(?:(,)|(?=\)))
403-
endCaptures:
404-
'1': {name: punctuation.separator.tuple.python}
405-
patterns:
406-
- include: $self
407-
408398
- name: meta.structure.dictionary.python
409399
match: (\{)(\s*(\}))
410400
captures:
@@ -501,7 +491,8 @@ repository:
501491
patterns:
502492
- include: '#keyword_arguments'
503493
- include: $self
504-
- comment: "These are statements in Py2, but don't really fit into keyword.control.flow with the rest"
494+
- comment: "These are statements in Py2, but don't really fit into keyword.control.flow\
495+
\ with the rest"
505496
name: support.function.builtin.python
506497
match: (?<!\.)\b(print|del)\b
507498

@@ -1040,7 +1031,7 @@ repository:
10401031
- include: '#string_quoted_double'
10411032
- include: '#string_quoted_single'
10421033
author: Matt Morrison @MattDMo [email protected]
1043-
bundleUUID: 11B0273F-0284-4483-B17B-4B8D0A9294CC
1034+
bundleUUID: 0F24FCF1-6543-4CC6-8B33-2EAED401FE3A
10441035
firstLineMatch: ^#!/.*\bpython[0-9.-]*\b
10451036
foldingStartMarker: ^\s*(def|class)\s+([.a-zA-Z0-9_ <]+)\s*(\((.*)\))?\s*:|\{\s*$|\(\s*$|\[\s*$|^\s*"""(?=.)(?!.*""")
10461037
foldingStopMarker: ^\s*$|^\s*\}|^\s*\]|^\s*\)|^\s*"""\s*$

PythonImproved.tmLanguage

Lines changed: 16 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<key>author</key>
66
<string>Matt Morrison @MattDMo [email protected]</string>
77
<key>bundleUUID</key>
8-
<string>11B0273F-0284-4483-B17B-4B8D0A9294CC</string>
8+
<string>0F24FCF1-6543-4CC6-8B33-2EAED401FE3A</string>
99
<key>comment</key>
1010
<string>To make PythonImproved your default Python syntax, open a .py file and select View|Syntax|Open all with current extension as...|PythonImproved.</string>
1111
<key>fileTypes</key>
@@ -1029,6 +1029,19 @@
10291029
<key>include</key>
10301030
<string>#dotted_name</string>
10311031
</dict>
1032+
<dict>
1033+
<key>begin</key>
1034+
<string>(\()</string>
1035+
<key>end</key>
1036+
<string>(\))</string>
1037+
<key>patterns</key>
1038+
<array>
1039+
<dict>
1040+
<key>include</key>
1041+
<string>$self</string>
1042+
</dict>
1043+
</array>
1044+
</dict>
10321045
<dict>
10331046
<key>captures</key>
10341047
<dict>
@@ -1049,7 +1062,7 @@
10491062
</dict>
10501063
</dict>
10511064
<key>match</key>
1052-
<string>\b(\[)(\s*(\]))\b</string>
1065+
<string>(\[)(\s*(\]))\b</string>
10531066
</dict>
10541067
<dict>
10551068
<key>begin</key>
@@ -1125,56 +1138,6 @@
11251138
<key>name</key>
11261139
<string>meta.structure.tuple.python</string>
11271140
</dict>
1128-
<dict>
1129-
<key>begin</key>
1130-
<string>\b(\()</string>
1131-
<key>beginCaptures</key>
1132-
<dict>
1133-
<key>1</key>
1134-
<dict>
1135-
<key>name</key>
1136-
<string>punctuation.definition.tuple.begin.python</string>
1137-
</dict>
1138-
</dict>
1139-
<key>end</key>
1140-
<string>(\))\b</string>
1141-
<key>endCaptures</key>
1142-
<dict>
1143-
<key>1</key>
1144-
<dict>
1145-
<key>name</key>
1146-
<string>punctuation.definition.tuple.end.python</string>
1147-
</dict>
1148-
</dict>
1149-
<key>name</key>
1150-
<string>meta.structure.tuple.python</string>
1151-
<key>patterns</key>
1152-
<array>
1153-
<dict>
1154-
<key>begin</key>
1155-
<string>(?&lt;=\(|\,)\s*(?![\),])</string>
1156-
<key>contentName</key>
1157-
<string>meta.structure.tuple.item.python</string>
1158-
<key>end</key>
1159-
<string>\s*(?:(,)|(?=\)))</string>
1160-
<key>endCaptures</key>
1161-
<dict>
1162-
<key>1</key>
1163-
<dict>
1164-
<key>name</key>
1165-
<string>punctuation.separator.tuple.python</string>
1166-
</dict>
1167-
</dict>
1168-
<key>patterns</key>
1169-
<array>
1170-
<dict>
1171-
<key>include</key>
1172-
<string>$self</string>
1173-
</dict>
1174-
</array>
1175-
</dict>
1176-
</array>
1177-
</dict>
11781141
<dict>
11791142
<key>captures</key>
11801143
<dict>
@@ -3334,6 +3297,6 @@
33343297
<key>scopeName</key>
33353298
<string>source.python</string>
33363299
<key>uuid</key>
3337-
<string>0F24FCF1-6543-4CC6-8B33-2EAED401FE3A</string>
3300+
<string>11B0273F-0284-4483-B17B-4B8D0A9294CC</string>
33383301
</dict>
33393302
</plist>

messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"1.2.1": "messages/1.2.1.txt",
44
"1.3.0": "messages/1.3.0.txt",
55
"1.3.1": "messages/1.3.1.txt",
6-
"1.4.0": "messages/1.4.0.txt"
6+
"1.4.2": "messages/1.4.2.txt"
77
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Python Improved v1.4.0
1+
Python Improved v1.4.2
22
======================
33

44
This is a "mid-way" release while I ponder some major changes to how functions,

0 commit comments

Comments
 (0)