Parcourir la source

Merge remote-tracking branch 'upstream/master'

Peter Adrichem il y a 10 ans
Parent
révision
55fbf70d3c
5 fichiers modifiés avec 49 ajouts et 15 suppressions
  1. 7
    2
      CHANGES.txt
  2. 21
    0
      LICENSE
  3. 10
    9
      README.rst
  4. 9
    4
      syntax/python.vim
  5. 2
    0
      test.py

+ 7
- 2
CHANGES.txt Voir le fichier

@@ -1,3 +1,8 @@
1
+Revision 3.3.7 (2014-12-27):
2
+
3
+    - Add support for Python 3 non-ASCII decorator names.
4
+      Patch by Victor Salgado
5
+
1 6
 Revision 3.3.6 (2013-11-18):
2 7
 
3 8
     - Highlight 'yield from' statement introduced in Python 3.3. Reported by
@@ -6,10 +11,10 @@ Revision 3.3.6 (2013-11-18):
6 11
 Revision 3.3.5 (2013-08-31):
7 12
 
8 13
     - Highlight 'import', 'from' and 'as' as include statements.
9
-      Patch by pydave at GitHub.
14
+      Patch by David Briscoe
10 15
     - Added new option 'python_highlight_file_headers_as_comments' (disabled by
11 16
       default) to highlight shebang and coding file headers as comments.
12
-      Proposed by pydave at GitHub.
17
+      Proposed by David Briscoe.
13 18
 
14 19
 Revision 3.3.4 (2013-08-11):
15 20
 

+ 21
- 0
LICENSE Voir le fichier

@@ -0,0 +1,21 @@
1
+The MIT License (MIT)
2
+
3
+Copyright (c) 2002-2014 Dmitry Vasiliev <dima@hlabs.org>
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 10
- 9
README.rst Voir le fichier

@@ -130,14 +130,15 @@ Contributors
130 130
 
131 131
 List of the contributors in alphabetical order:
132 132
 
133
-- Andrea Riciputi
133
+- `Andrea Riciputi <https://github.com/mrrech>`_
134 134
 - Anton Butanaev
135 135
 - Caleb Adamantine
136
-- Elizabeth Myers
137
-- Jeroen Ruigrok van der Werven
138
-- John Eikenberry
139
-- Marc Weber
140
-- Pedro Algarvio
141
-- pydave at GitHub
142
-- Will Gray
143
-- Yuri Habrusiev
136
+- `David Briscoe <https://github.com/idbrii>`_
137
+- `Elizabeth Myers <https://github.com/Elizafox>`_
138
+- `Jeroen Ruigrok van der Werven <https://github.com/ashemedai>`_
139
+- `John Eikenberry <https://github.com/eikenb>`_
140
+- `Marc Weber <https://github.com/MarcWeber>`_
141
+- `Pedro Algarvio <https://github.com/s0undt3ch>`_
142
+- `Victor Salgado <https://github.com/mcsalgado>`_
143
+- `Will Gray <https://github.com/graywh>`_
144
+- `Yuri Habrusiev <https://github.com/yuriihabrusiev>`_

+ 9
- 4
syntax/python.vim Voir le fichier

@@ -2,9 +2,9 @@
2 2
 " Language:     Python
3 3
 " Maintainer:   Dmitry Vasiliev <dima at hlabs dot org>
4 4
 " URL:          https://github.com/hdima/python-syntax
5
-" Last Change:  2013-11-18
5
+" Last Change:  2014-12-27
6 6
 " Filenames:    *.py
7
-" Version:      3.3.6
7
+" Version:      3.3.7
8 8
 "
9 9
 " Based on python.vim (from Vim 6.1 distribution)
10 10
 " by Neil Schemenauer <nas at python dot ca>
@@ -25,12 +25,13 @@
25 25
 "   Andrea Riciputi
26 26
 "   Anton Butanaev
27 27
 "   Caleb Adamantine
28
+"   David Briscoe
28 29
 "   Elizabeth Myers
29 30
 "   Jeroen Ruigrok van der Werven
30 31
 "   John Eikenberry
31 32
 "   Marc Weber
32 33
 "   Pedro Algarvio
33
-"   pydave at GitHub
34
+"   Victor Salgado
34 35
 "   Will Gray
35 36
 "   Yuri Habrusiev
36 37
 "
@@ -179,7 +180,11 @@ endif
179 180
 "
180 181
 
181 182
 syn match   pythonDecorator	"@" display nextgroup=pythonDottedName skipwhite
182
-syn match   pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained
183
+if s:Python2Syntax()
184
+  syn match   pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained
185
+else
186
+  syn match   pythonDottedName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\)*" display contained
187
+endif
183 188
 syn match   pythonDot        "\." display containedin=pythonDottedName
184 189
 
185 190
 "

+ 2
- 0
test.py Voir le fichier

@@ -51,6 +51,8 @@ RuntimeWarning FutureWarning ImportWarning UnicodeWarning
51 51
 
52 52
 @ decoratorname
53 53
 @ object.__init__(arg1, arg2)
54
+@ декоратор
55
+@ декоратор.décorateur
54 56
 
55 57
 # Numbers
56 58