Added vscodium

This commit is contained in:
Kristofers Solo
2022-04-28 21:17:01 +03:00
parent 837a479d82
commit d7dddc39ef
29139 changed files with 250215 additions and 45125 deletions

View File

@@ -1 +0,0 @@
{"ms-vscode.references-view-0.0.86":true,"ms-vscode.js-debug-companion-1.0.16":true,"magicstack.magicpython-1.1.0":true,"yzhang.markdown-all-in-one-3.4.3":true}

View File

@@ -1,23 +0,0 @@
language: node_js
node_js:
- "6"
env:
- CXX=g++-4.8
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
install:
- make
script:
- make ci-test
- 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Language="en-US" Id="MagicPython" Version="1.1.0" Publisher="magicstack"/>
<DisplayName>MagicPython</DisplayName>
<Description xml:space="preserve">Syntax highlighter for cutting edge Python.</Description>
<Tags>python,highlighter,syntax,python3,MagicPython,__ext_py,__ext_py3,__ext_rpy,__ext_pyw,__ext_cpy,__ext_pyi,__ext_SConstruct,__ext_Sconstruct,__ext_sconstruct,__ext_SConscript,__ext_gyp,__ext_gypi,__ext_wsgi</Tags>
<Categories>Languages</Categories>
<GalleryFlags>Public</GalleryFlags>
<Badges></Badges>
<Properties>
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="*" />
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
<Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
<Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
<Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/MagicStack/MagicPython.git" />
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/MagicStack/MagicPython.git" />
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/MagicStack/MagicPython.git" />
<Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/MagicStack/MagicPython/issues" />
<Property Id="Microsoft.VisualStudio.Services.Branding.Color" Value="#2c2c2c" />
<Property Id="Microsoft.VisualStudio.Services.Branding.Theme" Value="dark" />
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
</Properties>
<License>extension/LICENSE.txt</License>
<Icon>extension/icon.png</Icon>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Code"/>
</Installation>
<Dependencies/>
<Assets>
<Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
<Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/README.md" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/LICENSE.txt" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/icon.png" Addressable="true" />
</Assets>
</PackageManifest>

View File

@@ -1,81 +0,0 @@
{
"name": "MagicPython",
"version": "1.1.0",
"engines": {
"atom": "*",
"node": "*",
"vscode": "*"
},
"repository": {
"type": "git",
"url": "https://github.com/MagicStack/MagicPython.git"
},
"bugs": {
"url": "https://github.com/MagicStack/MagicPython/issues"
},
"description": "Syntax highlighter for cutting edge Python.",
"license": "MIT",
"publisher": "magicstack",
"categories": [
"Languages"
],
"keywords": [
"python",
"highlighter",
"syntax",
"python3"
],
"icon": "icon.png",
"galleryBanner": {
"color": "#2c2c2c",
"theme": "dark"
},
"contributes": {
"//": [
"This section is for VSCode.",
"NOTE: remember to update grammar/src/MagicPython.syntax.yaml, too."
],
"languages": [
{
"id": "python",
"aliases": [
"MagicPython",
"python"
],
"extensions": [
".py",
".py3",
".rpy",
".pyw",
".cpy",
".pyi",
".SConstruct",
".Sconstruct",
".sconstruct",
".SConscript",
".gyp",
".gypi",
".wsgi"
]
}
],
"grammars": [
{
"language": "python",
"scopeName": "source.python",
"path": "./grammars/MagicPython.tmLanguage"
}
]
},
"devDependencies": {
"oniguruma": "^7.0.0",
"syntaxdev": "0.0.16"
},
"__metadata": {
"id": "1f5eb737-5496-44a3-a8a1-36a85eee4979",
"publisherId": "0f082869-2c63-4c83-b0e2-780d8e645f86",
"publisherDisplayName": "MagicStack Inc.",
"isPreReleaseVersion": false,
"installedTimestamp": 1641229806297
}
}

View File

@@ -1,13 +0,0 @@
<!--
Thanks for wanting to report an issue you've found in MagicPython.
If this is a bug report, then please fill in the template below.
Thank you!
-->
* **Editor name and version**:
* **Platform**:
* **Color scheme**:
* **MagicPython version**:
* **A sreenshot**:
* **5-10 lines of surrounding code**:

View File

@@ -1,5 +0,0 @@
node_modules
.DS_Store
*.cache
*.pyc
package-lock.json

View File

@@ -1,2 +0,0 @@
Victor Petrovykh <victor@magic.io>
Yury Selivanov <yury@magic.io>

View File

@@ -1,21 +0,0 @@
The MIT License
Copyright (c) 2015-present MagicStack Inc. http://magic.io
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -1,39 +0,0 @@
.PHONY: all ci-test test release devenv publish
all: devenv release
ci-test: release
# Run tests
./node_modules/.bin/syntaxdev test --tests test/**/*.py --syntax grammars/src/MagicPython.syntax.yaml
./node_modules/.bin/syntaxdev test --tests test/**/*.re --syntax grammars/src/MagicRegExp.syntax.yaml
# Check if the version specified in "package.json" matches the latest git tag
@if [ \
`cat package.json | grep -e '^[[:space:]]*"version":' | sed -e 's/[[:space:]]*"version":[[:space:]]*"\(.*\)",/\1/'` \
!= \
`git describe --tags --abbrev=0 | sed -e 's/v\([[:digit:]]\{1,\}\.[[:digit:]]\{1,\}\.[[:digit:]]\{1,\}\).*/\1/'` \
] ; \
then echo "Error: package.version != git.tag" && exit 1 ; fi
test: ci-test
atom -t test/atom-spec
devenv:
npm install syntaxdev@0.0.16
release:
./node_modules/.bin/syntaxdev build-plist --in grammars/src/MagicPython.syntax.yaml --out grammars/MagicPython.tmLanguage
./node_modules/.bin/syntaxdev build-plist --in grammars/src/MagicRegExp.syntax.yaml --out grammars/MagicRegExp.tmLanguage
./node_modules/.bin/syntaxdev build-cson --in grammars/src/MagicPython.syntax.yaml --out grammars/MagicPython.cson
./node_modules/.bin/syntaxdev build-cson --in grammars/src/MagicRegExp.syntax.yaml --out grammars/MagicRegExp.cson
./node_modules/.bin/syntaxdev scopes --syntax grammars/src/MagicPython.syntax.yaml > misc/scopes
./node_modules/.bin/syntaxdev atom-spec --package-name MagicPython --tests test/**/*.py --syntax grammars/src/MagicPython.syntax.yaml --out test/atom-spec/python-spec.js
./node_modules/.bin/syntaxdev atom-spec --package-name MagicPython --tests test/**/*.re --syntax grammars/src/MagicRegExp.syntax.yaml --out test/atom-spec/python-re-spec.js
publish: test
apm publish patch
rm -rf ./node_modules/syntaxdev
vsce publish

View File

@@ -1,252 +0,0 @@
# Magic Python [![Build Status](https://travis-ci.org/MagicStack/MagicPython.svg?branch=master)](https://travis-ci.org/MagicStack/MagicPython) [![apm](https://img.shields.io/apm/dm/magicpython.svg?label=Atom)](https://atom.io/packages/magicpython) [![Package Control](https://img.shields.io/packagecontrol/dt/MagicPython.svg?label=Sublime%20Text)](https://packagecontrol.io/packages/MagicPython) [![VSM](https://vsmarketplacebadge.apphb.com/installs-short/magicstack.MagicPython.svg?subject=Visual%20Studio%20Code)](https://marketplace.visualstudio.com/items?itemName=magicstack.MagicPython)
This is a package with preferences and syntax highlighter for cutting edge
Python 3, although Python 2 is well supported, too. The syntax is compatible
with [Sublime Text](http://www.sublimetext.com), [Atom](http://atom.io) and
[Visual Studio Code](http://code.visualstudio.com). It is meant to be a drop-in
replacement for the default Python package.
We are proud to say that MagicPython is used by GitHub to highlight Python.
**Attention VSCode users**: MagicPython is used as the _default_
Python highlighter in Visual Studio Code. Don't install it unless you
want or need the cutting edge version of it. You will likely see no
difference because you're already using MagicPython.
MagicPython correctly highlights all Python 3 syntax features,
including type annotations, f-strings and regular expressions. It is
built from scratch for robustness with an extensive test suite.
Type hints in comments require support by the color scheme. The one
used in the screenshot is
[Chromodynamics](https://github.com/MagicStack/Chromodynamics).
![](https://magicstack.github.io/MagicPython/example.png)
## Installation Instructions
This is meant to be a drop-in replacement for the default Python package.
In **Atom**, install the `MagicPython` package and disable the built-in
`language-python` package.
In **Sublime Text**, install `MagicPython` package via "Package Control" and
disable the built-in `Python` package (using
`Package Control -> Disable Package`, or directly by adding `"Python"` to
`"ignored_packages"` in the settings file).
In **VSCode**, starting with version 0.10.1, install `MagicPython` with
`Install Extension` command.
Alternatively, the package can be installed manually in all editors:
* copy the MagicPython package into the Sublime/Atom/VSCode user packages
directory;
* disable Python package;
* enjoy.
## Changes and Improvements
The main motivation behind this package was the difficulty of using modern
Python with other common syntax highlighters. They do a good job of the 90% of
the language, but then fail on the nuances of some very useful, but often
overlooked features. Function annotations tend to freak out the highlighters in
various ways. Newly introduced keywords and magic methods are slow to be
integrated. Another issue is string highlighting, where all raw strings are
often assumed to be regular expressions or special markup used by `.format` is
completely ignored. Bumping into all of these issues on daily basis eventually
led to the creation of this package.
Overall, the central idea is that it should be easy to notice something odd or
special about the code. Odd or special doesn't necessarily mean incorrect, but
certainly worth the explicit attention.
### Annotations
Annotations should not break the highlighting. They should be no more difficult
to read at a glance than other code or comments.
A typical case is having a string annotation that spans several lines by using
implicit string concatenation. Multi-line strings are suboptimal for use in
annotations as it may be highly undesirable to have odd indentation and extra
whitespace in the annotation string. Of course, there is no problem using line
continuation or even having comments mixed in with implicit string
concatenation. All of these will be highlighted as you'd expect in any other
place in the code.
```python
def some_func(a, # nothing fancy here, yet
b: 'Annotation: ' # implicitly
'"foo" for Foo, ' # concatenated
'"bar" for Bar, ' # annotation
'"other" otherwise'='otherwise'):
```
A more advanced use case for annotations is to actually have complex expressions
in them, such as lambda functions, tuples, lists, dicts, sets, comprehensions.
Admittedly, all of these might be less frequently used, but when they are, you
can rely on them being highlighted normally in all their glorious details.
```python
# no reason why this should cause the highlighter to break
#
def some_func(a:
# annotation starts here
lambda x=None:
{key: val
for key, val in
(x if x is not None else [])
}
# annotation ends here and below is the default for 'a'
=42):
```
Result annotations are handled as any other expression would be. No reason to
worry that the body of the function would look messed up.
```python
# no reason why this should cause the highlighter to break
#
def some_func() -> {
'Some', # comments
'valid', # are
'expression' # good
}:
```
### Strings
Strings are used in many different ways for processing and presenting data.
Making the highlighter more friendly towards these uses can help you concentrate
your efforts on what matters rather than visual parsing.
Raw strings are often interpreted as regular expressions. This is a bit of a
problem, because depending on the application this may actually not be the most
common case. Raw strings can simply be the input to some other processor, in
which case regexp-specific highlighting is really hindering the overall
readability. MagicPython follows a convention that a lower-case `r` prefix means
a regexp string, but an upper-case `R` prefix means just a raw string with no
special regexp semantics. This convention holds true for all of the legal
combinations of prefixes. As always the syntax is biased towards Python 3, thus
it will mark Python-2-only prefixes (i.e. variations of `ur`) as deprecated.
String formatting is often only supported for '%-style formatting', however, the
recommended and more readable syntax used by `.format` is ignored. The benefits
of using simple and readable `{key}` replacement fields are hindered by the fact
that in a complex or long string expression it may not be easily apparent what
parameters will actually be needed by `.format`. This is why MagicPython
highlights both kinds of string formatting syntax within the appropriate string
types (bytes don't have a `.format` method in Python 3, so they don't get the
special highlighting for it, raw and unicode strings do). Additionally, the
highlighter also validates that the formatting is following the correct syntax.
It can help noticing an error in complex formatting expressions early.
Python 3.6 f-strings are supported in both the raw and regular
flavors. The support for them is somewhat more powerful than what can
be done in regular strings with `.format`, because the f-string spec
allows to highlight them with less ambiguity.
### Numeric literals
Most numbers are just regular decimal constants, but any time that octal,
binary, hexadecimal or complex numbers are used it's worth noting that they are
of a special type. Highlighting of Python 2 'L' integers is also supported.
Underscores in numeric literals are also supported (PEP 515, introduced in
Python 3.6):
```python
100_000_000_000 0b_1110_0101 0x_FF_12_A0_99
```
### Python 3.5 features
New keywords `async` and `await` are properly highlighted. Currently, these
keywords are new and are not yet reserved, so the Python interpreter will allow
using them as variable names. However, `async` and `await` are not recommended
to be used as variable, class, function or module names. Introduced by
[PEP 492](https://www.python.org/dev/peps/pep-0492/) in Python 3.5, they will
become proper keywords in Python 3.7. It is very important that the highlighter
shows their proper status when they are used as function parameter names, as
that could otherwise be unnoticed and lead to very messy debugging down the
road.
### Built-ins and Magic Methods
Various built-in types, classes, functions, as well as magic methods are all
highlighted. Specifically, they are highlighted when they appear as names in
user definitions. Although it is not an error to have classes and functions that
mask the built-ins, it is certainly worth drawing attention to, so that masking
becomes a deliberate rather than accidental act.
Highlighting built-ins in class inheritance list makes it slightly more obvious
where standard classes are extended. It is also easier to notice some typos
(have you ever typed `Excepiton`?) a little earlier.
### Parameters and Arguments
MagicPython highlights keywords when they are used as parameter/argument names.
This was mentioned for the case of `async` and `await`, but it holds true for
all other keywords. Although the Python interpreter will produce an appropriate
error message when reserved keywords are used as identifier names, it's still
worth showing them early, to spare even this small debugging effort.
## Development
You need `npm` and `node.js` to work on MagicPython.
- clone the repository
- run `make` to build the local development environment
- run `make release` to build the syntax packages for Sublime Text and Atom
(running `make test` also generates the "release" packages)
Please note that we have some unit tests for the syntax scoping. We will be
expanding and updating our test corpus. This allows us to trust that tiny
inconsistencies will not easily creep in as we update the syntax and fix bugs.
Use `make test` to run the tests regularly while updating the syntax spec.
Currently the test files have two parts to them, separated by 3 empty newlines:
the code to be scoped and the spec that the result must match.
If you intend to submit a pull request, please follow the following guidelines:
- keep code lines under 80 characters in length, it improves readability
- please _do_ use multi-line regular expressions for any non-trivial cases like:
+ the regexp contains a mix of escaped and unescaped braces/parentheses
+ the regexp has several `|` in it
+ the regexp has several pairs of parentheses, especially nested ones
+ or the regexp is simply longer than 35 characters
- always run `make test` to ensure that your changes didn't have unexpected side
effects
- update unit tests and add new ones if needed, keeping the test cases short
whenever possible
### Multiple scopes
It is sometimes necessary to assign multiple scopes to the same
matched group. It is *very important* to keep in mind that the order
of these scopes is apparently treated as significant by the engines
processing the grammar specs. However, it is equally important to know
that different specification formats seem to have different order of
importance (most important first vs. last). Since we try to create
grammar that can be compiled into several different formats, we must
chose one convention and then translate it when necessary during
compilation step. Our convention is therefore that *most important
scope goes first*.
## Color Scheme
If you want to write your own color scheme for MagicPython you can
find a list of all the scopes that we use in
[misc/scopes](https://github.com/MagicStack/MagicPython/blob/master/misc/scopes). The file is automatically generated based
on the syntax grammar, so it is always up-to-date and exhaustive.

View File

@@ -1,435 +0,0 @@
# AUTOGENERATED FROM grammars/src/MagicRegExp.syntax.yaml
name: "MagicRegExp"
scopeName: "source.regexp.python"
fileTypes: [
"re"
]
uuid: "39e15186-71e6-11e5-b82c-7c6d62900c7c"
patterns: [
{
include: "#regexp-expression"
}
]
repository:
"regexp-base-expression":
patterns: [
{
include: "#regexp-quantifier"
}
{
include: "#regexp-base-common"
}
]
"fregexp-base-expression":
patterns: [
{
include: "#fregexp-quantifier"
}
{
include: "#fstring-formatting-braces"
}
{
match: "\\{.*?\\}"
}
{
include: "#regexp-base-common"
}
]
"fstring-formatting-braces":
patterns: [
{
comment: "empty braces are illegal"
match: "({)(\\s*?)(})"
captures:
"1":
name: "constant.character.format.placeholder.other.python"
"2":
name: "invalid.illegal.brace.python"
"3":
name: "constant.character.format.placeholder.other.python"
}
{
name: "constant.character.escape.python"
match: "({{|}})"
}
]
"regexp-base-common":
patterns: [
{
name: "support.other.match.any.regexp"
match: "\\."
}
{
name: "support.other.match.begin.regexp"
match: "\\^"
}
{
name: "support.other.match.end.regexp"
match: "\\$"
}
{
name: "keyword.operator.quantifier.regexp"
match: "[+*?]\\??"
}
{
name: "keyword.operator.disjunction.regexp"
match: "\\|"
}
{
include: "#regexp-escape-sequence"
}
]
"regexp-quantifier":
name: "keyword.operator.quantifier.regexp"
match: '''
(?x)
\\{(
\\d+ | \\d+,(\\d+)? | ,\\d+
)\\}
'''
"fregexp-quantifier":
name: "keyword.operator.quantifier.regexp"
match: '''
(?x)
\\{\\{(
\\d+ | \\d+,(\\d+)? | ,\\d+
)\\}\\}
'''
"regexp-backreference-number":
name: "meta.backreference.regexp"
match: "(\\\\[1-9]\\d?)"
captures:
"1":
name: "entity.name.tag.backreference.regexp"
"regexp-backreference":
name: "meta.backreference.named.regexp"
match: '''
(?x)
(\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))
'''
captures:
"1":
name: "punctuation.parenthesis.backreference.named.begin.regexp support.other.parenthesis.regexp"
"2":
name: "entity.name.tag.named.backreference.regexp"
"3":
name: "punctuation.parenthesis.backreference.named.end.regexp support.other.parenthesis.regexp"
"regexp-flags":
name: "storage.modifier.flag.regexp"
match: "\\(\\?[aiLmsux]+\\)"
"regexp-escape-special":
name: "support.other.escape.special.regexp"
match: "\\\\([AbBdDsSwWZ])"
"regexp-escape-character":
name: "constant.character.escape.regexp"
match: '''
(?x)
\\\\ (
x[0-9A-Fa-f]{2}
| 0[0-7]{1,2}
| [0-7]{3}
)
'''
"regexp-escape-unicode":
name: "constant.character.unicode.regexp"
match: '''
(?x)
\\\\ (
u[0-9A-Fa-f]{4}
| U[0-9A-Fa-f]{8}
)
'''
"regexp-escape-catchall":
name: "constant.character.escape.regexp"
match: "\\\\(.|\\n)"
"regexp-escape-sequence":
patterns: [
{
include: "#regexp-escape-special"
}
{
include: "#regexp-escape-character"
}
{
include: "#regexp-escape-unicode"
}
{
include: "#regexp-backreference-number"
}
{
include: "#regexp-escape-catchall"
}
]
"regexp-charecter-set-escapes":
patterns: [
{
name: "constant.character.escape.regexp"
match: "\\\\[abfnrtv\\\\]"
}
{
include: "#regexp-escape-special"
}
{
name: "constant.character.escape.regexp"
match: "\\\\([0-7]{1,3})"
}
{
include: "#regexp-escape-character"
}
{
include: "#regexp-escape-unicode"
}
{
include: "#regexp-escape-catchall"
}
]
codetags:
match: "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)"
captures:
"1":
name: "keyword.codetag.notation.python"
"regexp-expression":
patterns: [
{
include: "#regexp-base-expression"
}
{
include: "#regexp-character-set"
}
{
include: "#regexp-comments"
}
{
include: "#regexp-flags"
}
{
include: "#regexp-named-group"
}
{
include: "#regexp-backreference"
}
{
include: "#regexp-lookahead"
}
{
include: "#regexp-lookahead-negative"
}
{
include: "#regexp-lookbehind"
}
{
include: "#regexp-lookbehind-negative"
}
{
include: "#regexp-conditional"
}
{
include: "#regexp-parentheses-non-capturing"
}
{
include: "#regexp-parentheses"
}
]
"regexp-character-set":
patterns: [
{
match: '''
(?x)
\\[ \\^? \\] (?! .*?\\])
'''
}
{
name: "meta.character.set.regexp"
begin: "(\\[)(\\^)?(\\])?"
end: "(\\])"
beginCaptures:
"1":
name: "constant.other.set.regexp punctuation.character.set.begin.regexp"
"2":
name: "keyword.operator.negation.regexp"
"3":
name: "constant.character.set.regexp"
endCaptures:
"1":
name: "constant.other.set.regexp punctuation.character.set.end.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-charecter-set-escapes"
}
{
name: "constant.character.set.regexp"
match: "[^\\n]"
}
]
}
]
"regexp-named-group":
name: "meta.named.regexp"
begin: '''
(?x)
(\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)
'''
end: "(\\))"
beginCaptures:
"1":
name: "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"
"2":
name: "entity.name.tag.named.group.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-comments":
name: "comment.regexp"
begin: "\\(\\?#"
end: "(\\))"
beginCaptures:
"0":
name: "punctuation.comment.begin.regexp"
endCaptures:
"1":
name: "punctuation.comment.end.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#codetags"
}
]
"regexp-lookahead":
begin: "(\\()\\?="
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.lookahead.regexp"
"1":
name: "punctuation.parenthesis.lookahead.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-lookahead-negative":
begin: "(\\()\\?!"
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.lookahead.negative.regexp"
"1":
name: "punctuation.parenthesis.lookahead.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-lookbehind":
begin: "(\\()\\?<="
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.lookbehind.regexp"
"1":
name: "punctuation.parenthesis.lookbehind.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-lookbehind-negative":
begin: "(\\()\\?<!"
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.lookbehind.negative.regexp"
"1":
name: "punctuation.parenthesis.lookbehind.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.negative.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-conditional":
begin: "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)"
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.conditional.regexp"
"1":
name: "punctuation.parenthesis.conditional.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.conditional.end.regexp keyword.operator.conditional.negative.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-parentheses-non-capturing":
begin: "\\(\\?:"
end: "(\\))"
beginCaptures:
"0":
name: "punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-parentheses":
begin: "\\("
end: "(\\))"
beginCaptures:
"0":
name: "punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]

View File

@@ -1,795 +0,0 @@
<!-- AUTOGENERATED FROM grammars/src/MagicRegExp.syntax.yaml -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>MagicRegExp</string>
<key>scopeName</key>
<string>source.regexp.python</string>
<key>fileTypes</key>
<array>
<string>re</string>
</array>
<key>uuid</key>
<string>39e15186-71e6-11e5-b82c-7c6d62900c7c</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>regexp-base-expression</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-quantifier</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-base-common</string>
</dict>
</array>
</dict>
<key>fregexp-base-expression</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#fregexp-quantifier</string>
</dict>
<dict>
<key>include</key>
<string>#fstring-formatting-braces</string>
</dict>
<dict>
<key>match</key>
<string>\{.*?\}</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-base-common</string>
</dict>
</array>
</dict>
<key>fstring-formatting-braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>comment</key>
<string>empty braces are illegal</string>
<key>match</key>
<string>({)(\s*?)(})</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>constant.character.format.placeholder.other.python</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.brace.python</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>constant.character.format.placeholder.other.python</string>
</dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>constant.character.escape.python</string>
<key>match</key>
<string>({{|}})</string>
</dict>
</array>
</dict>
<key>regexp-base-common</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>support.other.match.any.regexp</string>
<key>match</key>
<string>\.</string>
</dict>
<dict>
<key>name</key>
<string>support.other.match.begin.regexp</string>
<key>match</key>
<string>\^</string>
</dict>
<dict>
<key>name</key>
<string>support.other.match.end.regexp</string>
<key>match</key>
<string>\$</string>
</dict>
<dict>
<key>name</key>
<string>keyword.operator.quantifier.regexp</string>
<key>match</key>
<string>[+*?]\??</string>
</dict>
<dict>
<key>name</key>
<string>keyword.operator.disjunction.regexp</string>
<key>match</key>
<string>\|</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-sequence</string>
</dict>
</array>
</dict>
<key>regexp-quantifier</key>
<dict>
<key>name</key>
<string>keyword.operator.quantifier.regexp</string>
<key>match</key>
<string>(?x)
\{(
\d+ | \d+,(\d+)? | ,\d+
)\}
</string>
</dict>
<key>fregexp-quantifier</key>
<dict>
<key>name</key>
<string>keyword.operator.quantifier.regexp</string>
<key>match</key>
<string>(?x)
\{\{(
\d+ | \d+,(\d+)? | ,\d+
)\}\}
</string>
</dict>
<key>regexp-backreference-number</key>
<dict>
<key>name</key>
<string>meta.backreference.regexp</string>
<key>match</key>
<string>(\\[1-9]\d?)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.tag.backreference.regexp</string>
</dict>
</dict>
</dict>
<key>regexp-backreference</key>
<dict>
<key>name</key>
<string>meta.backreference.named.regexp</string>
<key>match</key>
<string>(?x)
(\() (\?P= \w+(?:\s+[[:alnum:]]+)?) (\))
</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.tag.named.backreference.regexp</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp</string>
</dict>
</dict>
</dict>
<key>regexp-flags</key>
<dict>
<key>name</key>
<string>storage.modifier.flag.regexp</string>
<key>match</key>
<string>\(\?[aiLmsux]+\)</string>
</dict>
<key>regexp-escape-special</key>
<dict>
<key>name</key>
<string>support.other.escape.special.regexp</string>
<key>match</key>
<string>\\([AbBdDsSwWZ])</string>
</dict>
<key>regexp-escape-character</key>
<dict>
<key>name</key>
<string>constant.character.escape.regexp</string>
<key>match</key>
<string>(?x)
\\ (
x[0-9A-Fa-f]{2}
| 0[0-7]{1,2}
| [0-7]{3}
)
</string>
</dict>
<key>regexp-escape-unicode</key>
<dict>
<key>name</key>
<string>constant.character.unicode.regexp</string>
<key>match</key>
<string>(?x)
\\ (
u[0-9A-Fa-f]{4}
| U[0-9A-Fa-f]{8}
)
</string>
</dict>
<key>regexp-escape-catchall</key>
<dict>
<key>name</key>
<string>constant.character.escape.regexp</string>
<key>match</key>
<string>\\(.|\n)</string>
</dict>
<key>regexp-escape-sequence</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-escape-special</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-character</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-unicode</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-backreference-number</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-catchall</string>
</dict>
</array>
</dict>
<key>regexp-charecter-set-escapes</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>constant.character.escape.regexp</string>
<key>match</key>
<string>\\[abfnrtv\\]</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-special</string>
</dict>
<dict>
<key>name</key>
<string>constant.character.escape.regexp</string>
<key>match</key>
<string>\\([0-7]{1,3})</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-character</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-unicode</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-catchall</string>
</dict>
</array>
</dict>
<key>codetags</key>
<dict>
<key>match</key>
<string>(?:\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\b)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.codetag.notation.python</string>
</dict>
</dict>
</dict>
<key>regexp-expression</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-base-expression</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-character-set</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-comments</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-flags</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-named-group</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-backreference</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-lookahead</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-lookahead-negative</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-lookbehind</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-lookbehind-negative</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-conditional</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-parentheses-non-capturing</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-parentheses</string>
</dict>
</array>
</dict>
<key>regexp-character-set</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?x)
\[ \^? \] (?! .*?\])
</string>
</dict>
<dict>
<key>name</key>
<string>meta.character.set.regexp</string>
<key>begin</key>
<string>(\[)(\^)?(\])?</string>
<key>end</key>
<string>(\])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.character.set.begin.regexp constant.other.set.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.negation.regexp</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>constant.character.set.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.character.set.end.regexp constant.other.set.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-charecter-set-escapes</string>
</dict>
<dict>
<key>name</key>
<string>constant.character.set.regexp</string>
<key>match</key>
<string>[^\n]</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>regexp-named-group</key>
<dict>
<key>name</key>
<string>meta.named.regexp</string>
<key>begin</key>
<string>(?x)
(\() (\?P &lt;\w+(?:\s+[[:alnum:]]+)?&gt;)
</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.tag.named.group.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-comments</key>
<dict>
<key>name</key>
<string>comment.regexp</string>
<key>begin</key>
<string>\(\?#</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.comment.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.comment.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#codetags</string>
</dict>
</array>
</dict>
<key>regexp-lookahead</key>
<dict>
<key>begin</key>
<string>(\()\?=</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.lookahead.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.lookahead.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-lookahead-negative</key>
<dict>
<key>begin</key>
<string>(\()\?!</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.lookahead.negative.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.lookahead.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-lookbehind</key>
<dict>
<key>begin</key>
<string>(\()\?&lt;=</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.lookbehind.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.lookbehind.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-lookbehind-negative</key>
<dict>
<key>begin</key>
<string>(\()\?&lt;!</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.lookbehind.negative.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.lookbehind.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-conditional</key>
<dict>
<key>begin</key>
<string>(\()\?\((\w+(?:\s+[[:alnum:]]+)?|\d+)\)</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.conditional.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.conditional.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-parentheses-non-capturing</key>
<dict>
<key>begin</key>
<string>\(\?:</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-parentheses</key>
<dict>
<key>begin</key>
<string>\(</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,50 +0,0 @@
# Copyright (c) 2014 GitHub Inc.
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# --------------------------------------------------------------------
# This package was derived from a TextMate bundle located at
# https://github.com/textmate/python.tmbundle and distributed under the following
# license, located in `README.mdown`:
# Permission to copy, use, modify, sell and distribute this
# software is granted. This software is provided "as is" without
# express or implied warranty, and with no claim as to its
# suitability for any purpose.
'scopeName': 'text.python.console'
'name': 'Python Console'
'fileTypes': [
'doctest'
'pycon'
]
'patterns': [
{
'match': '^(>{3}|\\.{3}|In \\[\\d+\\]:) (.+)$'
'captures':
'1':
'name': 'punctuation.separator.prompt.python.console'
'2':
'patterns': [
'include': 'source.python'
]
}
]

View File

@@ -1,66 +0,0 @@
# Copyright (c) 2014 GitHub Inc.
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# --------------------------------------------------------------------
# This package was derived from a TextMate bundle located at
# https://github.com/textmate/python.tmbundle and distributed under the following
# license, located in `README.mdown`:
# Permission to copy, use, modify, sell and distribute this
# software is granted. This software is provided "as is" without
# express or implied warranty, and with no claim as to its
# suitability for any purpose.
'scopeName': 'text.python.traceback'
'name': 'Python Traceback'
'fileTypes': [
'pytb'
]
'patterns': [
{
'match': '^ File ("[^"]+"), line (\\d+)(?:, in (.+))?$'
'captures': {
'1':
'name': 'string.python.traceback'
'2':
'name': 'constant.numeric.python.traceback'
'3':
'name': 'entity.name.function.python.traceback'
}
}
{
'match': '^ (.+)$'
'captures':
'1':
'patterns': [
'include': 'source.python'
]
}
{
'match': '^([^\\s:]+):(?: (.+))?$'
'captures':
'1':
'name': 'entity.name.type.class.python.traceback'
'2':
'name': 'string.python.traceback'
}
]

View File

@@ -1,20 +0,0 @@
---
name: MagicRegExp
scopeName: source.regexp.python
fileTypes: [re]
uuid: 39e15186-71e6-11e5-b82c-7c6d62900c7c
patterns:
- include: '#regexp-expression'
repository:
$apply:
- file: 'regexp-common.inc.syntax.yaml'
- file: 'regexp.inc.syntax.yaml'
vars:
prefix: ''
basename: regexp
marker: ''
nested: ''
guard: ''
...

View File

@@ -1,11 +0,0 @@
---
repository:
comments${suffix}:
name: comment.line.number-sign.python
begin: (\#)
beginCaptures:
'1': {name: punctuation.definition.comment.python}
end: ($${marker})
patterns:
- include: '#codetags'
...

View File

@@ -1,177 +0,0 @@
---
repository:
fstring-fnorm-quoted-${line}-line:
name: meta.fstring.python
begin: (\b[fF])([bBuU])?(${marker})
end: (\3)${guard}
beginCaptures:
# "storage.type.string.python" class should be the first one,
# because Atom, VSCode and GitHub don't understand scopes
# separated by whitespace, and simply use the first one
# of them. Highlighting 'f' as 'storage.type' is more
# important for us than having other scopes.
'1': {name: storage.type.string.python
string.quoted.${line}.python
string.interpolated.python}
'2': {name: invalid.illegal.prefix.python}
'3': {name: string.quoted.${line}.python
string.interpolated.python
punctuation.definition.string.begin.python}
endCaptures:
'1': {name: string.quoted.${line}.python
string.interpolated.python
punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#fstring-guts'
- include: '#fstring-illegal-${line}-brace'
- include: '#fstring-${line}-brace'
- include: '#fstring-${line}-core'
fstring-normf-quoted-${line}-line:
name: meta.fstring.python
begin: (\b[bBuU])([fF])(${marker})
end: (\3)${guard}
beginCaptures:
'1': {name: invalid.illegal.prefix.python}
'2': {name: storage.type.string.python
string.quoted.${line}.python
string.interpolated.python}
'3': {name: string.quoted.${line}.python
punctuation.definition.string.begin.python}
endCaptures:
'1': {name: string.quoted.${line}.python
string.interpolated.python
punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#fstring-guts'
- include: '#fstring-illegal-${line}-brace'
- include: '#fstring-${line}-brace'
- include: '#fstring-${line}-core'
fstring-raw-quoted-${line}-line:
name: meta.fstring.python
begin: (\b(?:[R][fF]|[fF][R]))(${marker})
end: (\2)${guard}
beginCaptures:
'1': {name: storage.type.string.python
string.quoted.raw.${line}.python
string.interpolated.python}
'2': {name: string.quoted.raw.${line}.python
punctuation.definition.string.begin.python}
endCaptures:
'1': {name: string.quoted.raw.${line}.python
string.interpolated.python
punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#fstring-raw-guts'
- include: '#fstring-illegal-${line}-brace'
- include: '#fstring-${line}-brace'
- include: '#fstring-raw-${line}-core'
fstring-${line}-core:
name: string.quoted.${line}.python string.interpolated.python
match: |
(?x)
(.+?)
(
(?# .* and .*? in multi-line match need special handling of
newlines otherwise SublimeText and Atom will match slightly
differently.
The guard for newlines has to be separate from the
lookahead because of special $ matching rule.)
($\n?)
|
(?=[\\\}\{]|${marker}${guard})
)
(?# due to how multiline regexps are matched we need a special case
for matching a newline character)
| \n
fstring-raw-${line}-core:
name: string.quoted.raw.${line}.python string.interpolated.python
match: |
(?x)
(.+?)
(
(?# .* and .*? in multi-line match need special handling of
newlines otherwise SublimeText and Atom will match slightly
differently.
The guard for newlines has to be separate from the
lookahead because of special $ matching rule.)
($\n?)
|
(?=[\\\}\{]|${marker}${guard})
)
(?# due to how multiline regexps are matched we need a special case
for matching a newline character)
| \n
fstring-${line}-brace:
comment: value interpolation using { ... }
begin: (\{)
end: |
(?x)
(\})${fguard}
beginCaptures:
'1': {name: constant.character.format.placeholder.other.python}
endCaptures:
'1': {name: constant.character.format.placeholder.other.python}
patterns:
- include: '#fstring-terminator-${line}'
- include: '#f-expression'
fstring-terminator-${line}:
patterns:
- name: storage.type.format.python
match: (![rsa])(?=})
- match: |
(?x)
(![rsa])?
( : \w? [<>=^]? [-+ ]? \#?
\d* ,? (\.\d+)? [bcdeEfFgGnosxX%]? )(?=})
captures:
# We use this awkward scope name instead of perhaps more
# elegant "support.other.format.python" because it appears
# that by default it gives a better visual result in various
# systems (e.g. GitHub). This is due to the fact that
# "storage.type..." is more likely to have special
# highlighting in any given color scheme than
# "support.other..."
#
'1': {name: storage.type.format.python}
'2': {name: storage.type.format.python}
- include: '#fstring-terminator-${line}-tail'
fstring-terminator-${line}-tail:
begin: (![rsa])?(:)(?=.*?{)
end: (?=})${fguard}
beginCaptures:
'1': {name: storage.type.format.python}
'2': {name: storage.type.format.python}
patterns:
- include: '#fstring-illegal-${line}-brace'
- include: '#fstring-${line}-brace'
- name: storage.type.format.python
match: ([bcdeEfFgGnosxX%])(?=})
- name: storage.type.format.python
match: (\.\d+)
- name: storage.type.format.python
match: (,)
- name: storage.type.format.python
match: (\d+)
- name: storage.type.format.python
match: (\#)
- name: storage.type.format.python
match: ([-+ ])
- name: storage.type.format.python
match: ([<>=^])
- name: storage.type.format.python
match: (\w)
...

View File

@@ -1,118 +0,0 @@
---
repository:
string-raw-quoted-${line}-line:
name: string.quoted.raw.${line}.python
begin: \b(([uU]R)|(R))(${marker})
end: (\4)${guard}
beginCaptures:
'2': {name: invalid.deprecated.prefix.python}
'3': {name: storage.type.string.python}
'4': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#string-${line}-bad-brace1-formatting-raw'
- include: '#string-${line}-bad-brace2-formatting-raw'
- include: '#string-raw-guts'
string-bin-quoted-${line}-line:
name: string.quoted.binary.${line}.python
begin: (\b[bB])(${marker})
end: (\2)${guard}
beginCaptures:
'1': {name: storage.type.string.python}
'2': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#string-entity'
string-raw-bin-quoted-${line}-line:
name: string.quoted.raw.binary.${line}.python
begin: (\b(?:R[bB]|[bB]R))(${marker})
end: (\2)${guard}
beginCaptures:
'1': {name: storage.type.string.python}
'2': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#string-raw-bin-guts'
string-quoted-${line}-line:
name: string.quoted.${line}.python
begin: (?:\b([rR])(?=[uU]))?([uU])?(${marker})
end: (\3)${guard}
beginCaptures:
'1': {name: invalid.illegal.prefix.python}
'2': {name: storage.type.string.python}
'3': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#string-${line}-bad-brace1-formatting-unicode'
- include: '#string-${line}-bad-brace2-formatting-unicode'
- include: '#string-unicode-guts'
string-${line}-bad-brace1-formatting-unicode:
comment: template using {% ... %}
begin: |
(?x)
(?= \{%
( .*? (?!${marker}${guard}) )
%\}
)
end: (?=${marker}${guard})
patterns:
- include: '#escape-sequence-unicode'
- include: '#escape-sequence'
- include: '#string-line-continuation'
string-${line}-bad-brace1-formatting-raw:
comment: template using {% ... %}
begin: |
(?x)
(?= \{%
( .*? (?!${marker}${guard}) )
%\}
)
end: (?=${marker}${guard})
patterns:
- include: '#string-consume-escape'
string-${line}-bad-brace2-formatting-unicode:
comment: odd format or format-like syntax
begin: |
(?x)
(?!\{\{)
(?= \{ (
\w*? (?!${marker}${guard}) [^!:\.\[}\w]
)
.*?(?!${marker}${guard})
\}
)
end: (?=${marker}${guard})
patterns:
- include: '#escape-sequence-unicode'
- include: '#string-entity'
string-${line}-bad-brace2-formatting-raw:
comment: odd format or format-like syntax
begin: |
(?x)
(?!\{\{)
(?= \{ (
\w*? (?!${marker}${guard}) [^!:\.\[}\w]
)
.*?(?!${marker}${guard})
\}
)
end: (?=${marker}${guard})
patterns:
- include: '#string-consume-escape'
- include: '#string-formatting'
...

View File

@@ -1,128 +0,0 @@
---
repository:
regexp-base-expression:
patterns:
- include: '#regexp-quantifier'
- include: '#regexp-base-common'
fregexp-base-expression:
patterns:
- include: '#fregexp-quantifier'
- include: '#fstring-formatting-braces'
- match: \{.*?\}
- include: '#regexp-base-common'
fstring-formatting-braces:
patterns:
- comment: empty braces are illegal
match: ({)(\s*?)(})
captures:
'1': {name: constant.character.format.placeholder.other.python}
'2': {name: invalid.illegal.brace.python}
'3': {name: constant.character.format.placeholder.other.python}
- name: constant.character.escape.python
match: ({{|}})
regexp-base-common:
patterns:
- name: support.other.match.any.regexp
match: \.
- name: support.other.match.begin.regexp
match: \^
- name: support.other.match.end.regexp
match: \$
- name: keyword.operator.quantifier.regexp
match: '[+*?]\??'
- name: keyword.operator.disjunction.regexp
match: \|
- include: '#regexp-escape-sequence'
regexp-quantifier:
name: keyword.operator.quantifier.regexp
match: |
(?x)
\{(
\d+ | \d+,(\d+)? | ,\d+
)\}
fregexp-quantifier:
name: keyword.operator.quantifier.regexp
match: |
(?x)
\{\{(
\d+ | \d+,(\d+)? | ,\d+
)\}\}
regexp-backreference-number:
name: meta.backreference.regexp
match: (\\[1-9]\d?)
captures:
'1': {name: entity.name.tag.backreference.regexp}
regexp-backreference:
name: meta.backreference.named.regexp
match: |
(?x)
(\() (\?P= \w+(?:\s+[[:alnum:]]+)?) (\))
captures:
'1': {name: punctuation.parenthesis.backreference.named.begin.regexp
support.other.parenthesis.regexp}
'2': {name: entity.name.tag.named.backreference.regexp}
'3': {name: punctuation.parenthesis.backreference.named.end.regexp
support.other.parenthesis.regexp}
regexp-flags:
name: storage.modifier.flag.regexp
match: \(\?[aiLmsux]+\)
regexp-escape-special:
name: support.other.escape.special.regexp
match: \\([AbBdDsSwWZ])
regexp-escape-character:
name: constant.character.escape.regexp
match: |
(?x)
\\ (
x[0-9A-Fa-f]{2}
| 0[0-7]{1,2}
| [0-7]{3}
)
regexp-escape-unicode:
name: constant.character.unicode.regexp
match: |
(?x)
\\ (
u[0-9A-Fa-f]{4}
| U[0-9A-Fa-f]{8}
)
regexp-escape-catchall:
name: constant.character.escape.regexp
match: \\(.|\n)
regexp-escape-sequence:
patterns:
- include: '#regexp-escape-special'
- include: '#regexp-escape-character'
- include: '#regexp-escape-unicode'
- include: '#regexp-backreference-number'
- include: '#regexp-escape-catchall'
regexp-charecter-set-escapes:
patterns:
- name: constant.character.escape.regexp
match: \\[abfnrtv\\]
- include: '#regexp-escape-special'
- name: constant.character.escape.regexp
match: \\([0-7]{1,3})
- include: '#regexp-escape-character'
- include: '#regexp-escape-unicode'
- include: '#regexp-escape-catchall'
codetags:
match: (?:\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\b)
captures:
'1': {name: keyword.codetag.notation.python}
...

View File

@@ -1,170 +0,0 @@
---
repository:
${prefix}${basename}-expression:
patterns:
- include: '#${basename}-base-expression'
- include: '#${prefix}regexp-character-set'
- include: '#${prefix}regexp-comments'
- include: '#regexp-flags'
- include: '#${prefix}regexp-named-group'
- include: '#regexp-backreference'
- include: '#${prefix}${basename}-lookahead'
- include: '#${prefix}${basename}-lookahead-negative'
- include: '#${prefix}${basename}-lookbehind'
- include: '#${prefix}${basename}-lookbehind-negative'
- include: '#${prefix}${basename}-conditional'
- include: '#${prefix}${basename}-parentheses-non-capturing'
- include: '#${prefix}${basename}-parentheses'
${nested}
${prefix}regexp-character-set:
patterns:
- match: |
(?x)
\[ \^? \] (?! .*?\])
- name: meta.character.set.regexp
begin: (\[)(\^)?(\])?
end: (\]${marker})${guard}
beginCaptures:
'1': {name: constant.other.set.regexp
punctuation.character.set.begin.regexp}
'2': {name: keyword.operator.negation.regexp}
'3': {name: constant.character.set.regexp}
endCaptures:
'1': {name: constant.other.set.regexp
punctuation.character.set.end.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#regexp-charecter-set-escapes'
- name: constant.character.set.regexp
match: '[^\n]'
${prefix}${basename}-named-group:
name: meta.named.regexp
begin: |
(?x)
(\() (\?P <\w+(?:\s+[[:alnum:]]+)?>)
end: (\)${marker})${guard}
beginCaptures:
'1': {name: punctuation.parenthesis.named.begin.regexp
support.other.parenthesis.regexp}
'2': {name: entity.name.tag.named.group.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.named.end.regexp
support.other.parenthesis.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}regexp-comments:
name: comment.regexp
begin: \(\?#
end: (\)${marker})${guard}
beginCaptures:
'0': {name: punctuation.comment.begin.regexp}
endCaptures:
'1': {name: punctuation.comment.end.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#codetags'
${prefix}${basename}-lookahead:
begin: '(\()\?='
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.lookahead.regexp}
'1': {name: punctuation.parenthesis.lookahead.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.lookahead.end.regexp
keyword.operator.lookahead.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-lookahead-negative:
begin: '(\()\?!'
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.lookahead.negative.regexp}
'1': {name: punctuation.parenthesis.lookahead.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.lookahead.end.regexp
keyword.operator.lookahead.negative.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-lookbehind:
begin: '(\()\?<='
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.lookbehind.regexp}
'1': {name: punctuation.parenthesis.lookbehind.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.lookbehind.end.regexp
keyword.operator.lookbehind.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-lookbehind-negative:
begin: '(\()\?<!'
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.lookbehind.negative.regexp}
'1': {name: punctuation.parenthesis.lookbehind.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.lookbehind.end.regexp
keyword.operator.lookbehind.negative.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-conditional:
begin: '(\()\?\((\w+(?:\s+[[:alnum:]]+)?|\d+)\)'
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.conditional.regexp}
'1': {name: punctuation.parenthesis.conditional.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.conditional.end.regexp
keyword.operator.conditional.negative.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-parentheses-non-capturing:
begin: '\(\?:'
end: (\)${marker})${guard}
beginCaptures:
'0': {name: punctuation.parenthesis.non-capturing.begin.regexp
support.other.parenthesis.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.non-capturing.end.regexp
support.other.parenthesis.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-parentheses:
begin: \(
end: (\)${marker})${guard}
beginCaptures:
'0': {name: punctuation.parenthesis.begin.regexp
support.other.parenthesis.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.end.regexp
support.other.parenthesis.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
...

View File

@@ -1,17 +0,0 @@
---
repository:
${basename}-${prefix}line:
name: ${scopename}
begin: \b(([uU]r)|(${modifier}r)|(r${modifier}?))${bquote}
end: ${equote}
beginCaptures:
'2': {name: invalid.deprecated.prefix.python}
'3': {name: storage.type.string.python}
'4': {name: storage.type.string.python}
'5': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
...

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -1,3 +0,0 @@
{
"install": "messages/install.txt"
}

View File

@@ -1,20 +0,0 @@
MagicPython
===========
Thank you for installing MagicPython -- a syntax highlighter for
cutting edge Python.
You're almost there, please do the following steps to finish
the installation:
* Close all open Python files;
* Disable the "Python" package:
- via Package Control by executing "Package Control: Disable Package";
- or manually, by adding "Python" to "ignored_packages", in your
`Preferences.sublime-settings` file.
If you find any oddities in how your Python code is highlighted, please
file a bug at https://github.com/MagicStack/MagicPython/issues.

View File

@@ -1,48 +0,0 @@
import asyncio
def showcase():
"""Some code to showcase the syntax.
Docstrings are recognized and have an additional scope.
Color schemas can render them differently from other strings.
HACK doctests are highlighted too.
>>> print('''hello
... world''')
"""
@decorator(param='spam')
async def coroutine(db:aio_db.DatabaseConnection) -> List[str]:
r"""A coroutine."""
await logger.log('working\x12with %r', aio_db)
async with db.transaction():
result = await db.query(...)
print(f'Result: {result!r}')
mapping = None # type: Dict[int, Any] # PEP 484
# a regular expression
get_regex = lambda: re.compile( # type: ignore
r"""\A
word
(?: # a comment
(?P<fill>.)?
(?P<align>[<>=^]) (?# another comment)
)?
another word\.\.\.
(?:\.(?P<precision>0|(?!0)\d+))?
\Z""",
re.VERBOSE | re.DOTALL)
# NOTE Numbers with leading zeros are invalid in Python 3,
# use 0o...
answer = func(0xdeadbeef + 0b00100001 + 0123 + 0o123 +
1_005_123 + # PEP 515
# complex numbers
.10e12 + 2j) @ mat
return R'''No escapes '\' in this \one'''

View File

@@ -1,171 +0,0 @@
comment.line.number-sign.python
comment.regexp
comment.typehint.directive.notation.python
comment.typehint.ignore.notation.python
comment.typehint.punctuation.notation.python
comment.typehint.type.notation.python
comment.typehint.variable.notation.python
constant.character.escape.python
constant.character.escape.regexp
constant.character.format.placeholder.other.python
constant.character.set.regexp
constant.character.unicode.regexp
constant.language.python
constant.numeric.bin.python
constant.numeric.dec.python
constant.numeric.float.python
constant.numeric.hex.python
constant.numeric.oct.python
constant.numeric.python
constant.other.caps.python
constant.other.ellipsis.python
constant.other.set.regexp
entity.name.function.decorator.python
entity.name.function.python
entity.name.tag.backreference.regexp
entity.name.tag.named.backreference.regexp
entity.name.tag.named.group.regexp
entity.name.type.class.python
entity.other.inherited-class.python
invalid.deprecated.backtick.python
invalid.deprecated.prefix.python
invalid.deprecated.semicolon.python
invalid.illegal.annotation.python
invalid.illegal.brace.python
invalid.illegal.dec.python
invalid.illegal.decorator.python
invalid.illegal.line.continuation.python
invalid.illegal.name.python
invalid.illegal.newline.python
invalid.illegal.operator.python
invalid.illegal.prefix.python
keyword.codetag.notation.python
keyword.control.flow.python
keyword.control.import.python
keyword.illegal.name.python
keyword.operator.arithmetic.python
keyword.operator.assignment.python
keyword.operator.bitwise.python
keyword.operator.comparison.python
keyword.operator.conditional.negative.regexp
keyword.operator.conditional.regexp
keyword.operator.disjunction.regexp
keyword.operator.logical.python
keyword.operator.lookahead.negative.regexp
keyword.operator.lookahead.regexp
keyword.operator.lookbehind.negative.regexp
keyword.operator.lookbehind.regexp
keyword.operator.negation.regexp
keyword.operator.python
keyword.operator.quantifier.regexp
keyword.operator.unpacking.arguments.python
keyword.operator.unpacking.parameter.python
meta.backreference.named.regexp
meta.backreference.regexp
meta.character.set.regexp
meta.class.inheritance.python
meta.class.python
meta.format.brace.python
meta.format.percent.python
meta.fstring.python
meta.function-call.generic.python
meta.function-call.python
meta.function.decorator.python
meta.function.parameters.python
meta.function.python
meta.item-access.python
meta.lambda-function.python
meta.named.regexp
meta.typehint.comment.python
punctuation.character.set.begin.regexp
punctuation.character.set.end.regexp
punctuation.comment.begin.regexp
punctuation.comment.end.regexp
punctuation.definition.arguments.begin.python
punctuation.definition.arguments.end.python
punctuation.definition.comment.python
punctuation.definition.decorator.python
punctuation.definition.dict.begin.python
punctuation.definition.dict.end.python
punctuation.definition.inheritance.begin.python
punctuation.definition.inheritance.end.python
punctuation.definition.list.begin.python
punctuation.definition.list.end.python
punctuation.definition.parameters.begin.python
punctuation.definition.parameters.end.python
punctuation.definition.string.begin.python
punctuation.definition.string.end.python
punctuation.parenthesis.backreference.named.begin.regexp
punctuation.parenthesis.backreference.named.end.regexp
punctuation.parenthesis.begin.python
punctuation.parenthesis.begin.regexp
punctuation.parenthesis.conditional.begin.regexp
punctuation.parenthesis.conditional.end.regexp
punctuation.parenthesis.end.python
punctuation.parenthesis.end.regexp
punctuation.parenthesis.lookahead.begin.regexp
punctuation.parenthesis.lookahead.end.regexp
punctuation.parenthesis.lookbehind.begin.regexp
punctuation.parenthesis.lookbehind.end.regexp
punctuation.parenthesis.named.begin.regexp
punctuation.parenthesis.named.end.regexp
punctuation.parenthesis.non-capturing.begin.regexp
punctuation.parenthesis.non-capturing.end.regexp
punctuation.section.class.begin.python
punctuation.section.function.begin.python
punctuation.section.function.lambda.begin.python
punctuation.separator.annotation.python
punctuation.separator.annotation.result.python
punctuation.separator.arguments.python
punctuation.separator.colon.python
punctuation.separator.continuation.line.python
punctuation.separator.dict.python
punctuation.separator.element.python
punctuation.separator.inheritance.python
punctuation.separator.parameters.python
punctuation.separator.period.python
punctuation.separator.slice.python
storage.modifier.declaration.python
storage.modifier.flag.regexp
storage.type.class.python
storage.type.format.python
storage.type.function.async.python
storage.type.function.lambda.python
storage.type.function.python
storage.type.imaginary.number.python
storage.type.number.python
storage.type.string.python
string.interpolated.python
string.quoted.binary.multi.python
string.quoted.binary.single.python
string.quoted.docstring.multi.python
string.quoted.docstring.raw.multi.python
string.quoted.docstring.raw.single.python
string.quoted.docstring.single.python
string.quoted.multi.python
string.quoted.raw.binary.multi.python
string.quoted.raw.binary.single.python
string.quoted.raw.multi.python
string.quoted.raw.single.python
string.quoted.single.python
string.regexp.quoted.multi.python
string.regexp.quoted.single.python
support.function.builtin.python
support.function.magic.python
support.other.escape.special.regexp
support.other.match.any.regexp
support.other.match.begin.regexp
support.other.match.end.regexp
support.other.parenthesis.regexp
support.type.exception.python
support.type.metaclass.python
support.type.python
support.variable.magic.python
variable.language.special.cls.python
variable.language.special.self.python
variable.legacy.builtin.python
variable.parameter.class.python
variable.parameter.function-call.python
variable.parameter.function.language.python
variable.parameter.function.language.special.cls.python
variable.parameter.function.language.special.self.python

View File

@@ -1,41 +0,0 @@
# Copyright (c) 2014 GitHub Inc.
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# --------------------------------------------------------------------
# This package was derived from a TextMate bundle located at
# https://github.com/textmate/python.tmbundle and distributed under the following
# license, located in `README.mdown`:
# Permission to copy, use, modify, sell and distribute this
# software is granted. This software is provided "as is" without
# express or implied warranty, and with no claim as to its
# suitability for any purpose.
'.source.python':
'editor':
'autoIndentOnPaste': false
'softTabs': true
'tabLength': 4
'foldEndPattern': '^\\s*\\}|^\\s*\\]|^\\s*\\)'
'commentStart': '# '
'increaseIndentPattern': '^\\s*(class|((async\\s+)?(def|with|for))|elif|else|except|finally|if|try|while)\\b.*:\\s*$'
'decreaseIndentPattern': '^\\s*(elif|else|except|finally)\\b.*:'

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.python</string>
<key>settings</key>
<dict>
<key>cancelCompletion</key>
<string>^(.*\b(and|or)$)|(\s*(pass|return|and|or|(class|def|import)\s*[a-zA-Z_0-9]+)$)</string>
</dict>
</dict>
</plist>

View File

@@ -1,46 +0,0 @@
[
// Auto-pair quotes
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(?:[bfruBFRU]|[^\"[:alnum:]_])$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
{ "key": "eol_selector", "operator": "equal", "operand": "source.python", "match_all": true }
]
},
// Auto-pair single quotes
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(?:[bfruBFRU]|[^'[:alnum:]_])$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
{ "key": "eol_selector", "operator": "equal", "operand": "source.python", "match_all": true }
]
},
// Auto-pair curly brackets
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "not_regex_contains", "operand": "^\\{", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "meta.fstring.python", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "string.quoted", "match_all": true }
]
},
// Replace a '{|}' with '{{|' when typing within f-string
{ "keys": ["{"], "command": "fstringbrace",
"context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "meta.fstring.python", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "constant.character.format.placeholder.other", "match_all": true }
]
}
]

View File

@@ -1,11 +0,0 @@
Some files in this directory were copied from
https://github.com/sublimehq/Packages repository and
are covered by their original license:
Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
See https://github.com/sublimehq/Packages/blob/master/LICENSE for more
details.

View File

@@ -1,5 +0,0 @@
{
"detect_indentation": true,
"translate_tabs_to_spaces": true,
"tab_size": 4
}

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Miscellaneous</string>
<key>scope</key>
<string>source.python</string>
<key>settings</key>
<dict>
<key>decreaseIndentPattern</key>
<string>^\s*(elif|else|except|finally)\b.*:</string>
<key>increaseIndentPattern</key>
<string>^\s*(class|((async\s+)?(def|with|for))|elif|else|except|finally|if|try|while)\b.*:\s*$</string>
<key>disableIndentNextLinePattern</key>
<string></string>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string># </string>
</dict>
<dict>
<key>name</key>
<string>TM_LINE_TERMINATOR</string>
<key>value</key>
<string>:</string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>1eca4598-6e20-11e5-a41f-7c6d62900c7c</string>
</dict>
</plist>

View File

@@ -1,12 +0,0 @@
{
"shell_cmd": "python -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"variants":
[
{
"name": "Syntax Check",
"shell_cmd": "python -m py_compile \"${file}\"",
}
]
}

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List: Hide Decorator</string>
<key>scope</key>
<string>source.python meta.function.decorator.python entity.name.function.decorator.python</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>0</integer>
<key>showInIndexedSymbolList</key>
<integer>0</integer>
</dict>
<key>uuid</key>
<string>f14b932e-6e1f-11e5-90fc-7c6d62900c7c</string>
</dict>
</plist>

View File

@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List</string>
<key>scope</key>
<string>source.python meta.function.python, source.python meta.class.python</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>symbolTransformation</key>
<string>
# transform into 'class Classname' form
s/(class)\s+([[:alpha:]_]\w*)\s*.*/$1 $2/g;
# transform into '[async] funciton_name(args,...)' long form
s/(?x)
def \s+
([[:alpha:]_]\w*) \s* \(
(.*?) \)(\s*: | \s*->.*) $
/$1\(($2\)/g;
# remove extra whitespace in arg list (except leading)
s/(\S)\s{2,}/$1 /g;
# transform into short form
s/(?x)
(class\s|async\s)? (\w+\()
(.{80})(.+)
(\))$
/$1$2$3\.\.\.$5/g;
</string>
</dict>
<key>uuid</key>
<string>092a7050-6e20-11e5-bf4c-7c6d62900c7c</string>
</dict>
</plist>

View File

@@ -1,157 +0,0 @@
# Copyright (c) 2014 GitHub Inc.
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# --------------------------------------------------------------------
# This package was derived from a TextMate bundle located at
# https://github.com/textmate/python.tmbundle and distributed under the following
# license, located in `README.mdown`:
# Permission to copy, use, modify, sell and distribute this
# software is granted. This software is provided "as is" without
# express or implied warranty, and with no claim as to its
# suitability for any purpose.
'.source.python':
'#!/usr/bin/env python':
'prefix': 'env'
'body': '#!/usr/bin/env python\n'
'#!/usr/bin/env python3':
'prefix': 'env3'
'body': '#!/usr/bin/env python3\n'
'# coding=utf-8':
'prefix': 'enc'
'body': '# -*- coding: utf-8 -*-\n'
'Import':
'prefix': 'im'
'body': 'import ${1:package/module}'
'From/Import':
'prefix': 'fim'
'body': 'from ${1:package/module} import ${2:names}'
'Assert Equal':
'prefix': 'ase'
'body': 'self.assertEqual(${1:expected}, ${2:actual}${3:, \'${4:message}\'})$0'
'Assert Not Equal':
'prefix': 'asne'
'body': 'self.assertNotEqual(${1:expected}, ${2:actual}${3:, \'${4:message}\'})$0'
'Assert Raises':
'prefix': 'asr'
'body': 'self.assertRaises(${1:exception}, ${2:callable})$0'
'Assert True':
'prefix': 'ast'
'body': 'self.assertTrue(${1:actual}${2:, \'${3:message}\'})$0'
'Assert False':
'prefix': 'asf'
'body': 'self.assertFalse(${1:actual}${2:, \'${3:message}\'})$0'
'Assert Is':
'prefix': 'asi'
'body': 'self.assertIs(${1:expected}, ${2:actual}${3:, \'${4:message}\'})$0'
'Assert Is Not':
'prefix': 'asint'
'body': 'self.assertIsNot(${1:expected}, ${2:actual}${3:, \'${4:message}\'})$0'
'Assert Is None':
'prefix': 'asino'
'body': 'self.assertIsNone(${1:actual}${2:, \'${3:message}\'})$0'
'Assert Is Not None':
'prefix': 'asinno'
'body': 'self.assertIsNotNone(${1:actual}${2:, \'${3:message}\'})$0'
'Assert In':
'prefix': 'asin'
'body': 'self.assertIn(${1:needle}, ${2:haystack}${3:, \'${4:message}\'})$0'
'Assert Not In':
'prefix': 'asni'
'body': 'self.assertNotIn(${1:needle}, ${2:haystack}${3:, \'${4:message}\'})$0'
'Assert':
'prefix': 'as'
'body': 'self.assert_(${1:boolean expression}${2:, \'${3:message}\'})$0'
'Fail (a test)':
'prefix': 'fail'
'body': 'self.fail(\'${1:message}\')$0'
'New Class':
'prefix': 'class'
'body': 'class ${1:ClassName}(${2:object}):\n\t"""${3:docstring for $1}"""\n\tdef __init__(self, ${4:arg}):\n\t\t${5:super($1, self).__init__()}\n\t\tself.arg = arg\n\t\t$0'
'New Method':
'prefix': 'defs'
'body': 'def ${1:mname}(self, ${2:arg}):\n\t${3:pass}'
'New Function':
'prefix': 'def'
'body': 'def ${1:fname}(${2:arg}):\n\t${3:pass}'
'New Property':
'prefix': 'property'
'body': 'def ${1:foo}():\n doc = "${2:The $1 property.}"\n def fget(self):\n ${3:return self._$1}\n def fset(self, value):\n ${4:self._$1 = value}\n def fdel(self):\n ${5:del self._$1}\n return locals()\n$1 = property(**$1())$0'
'if':
'prefix': 'if'
'body': 'if ${1:condition}:\n\t${2:pass}'
'for':
'prefix': 'for'
'body': 'for ${1:value} in ${2:variable}:\n\t${3:pass}'
'while':
'prefix': 'while'
'body': 'while ${1:condition}:\n\t${2:pass}'
'with statement':
'prefix': 'with'
'body': 'with ${1:expression} as ${2:target}:\n\t${3:pass}'
'Try/Except/Else/Finally':
'prefix': 'tryef'
'body': 'try:\n\t${1:pass}\nexcept${2: ${3:Exception} as ${4:e}}:\n\t${5:raise}\nelse:\n\t${6:pass}\nfinally:\n\t${7:pass}'
'Try/Except/Else':
'prefix': 'trye'
'body': 'try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}\nelse:\n\t${5:pass}'
'Try/Except/Finally':
'prefix': 'tryf'
'body': 'try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}\nfinally:\n\t${5:pass}'
'Try/Except':
'prefix': 'try'
'body': 'try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}'
'List Comprehension':
'prefix': 'lc'
'body': '[${1:value} for ${2:value} in ${3:variable}]'
'List Comprehension If Else':
'prefix': 'lcie'
'body': '[${1:value} if ${2:condition} else ${3:condition} for ${4:value} in ${5:variable}]'
'Dictionary Comprehension':
'prefix': 'dc'
'body': '{${1:key}: ${2:value} for ${3:key}, ${4:value} in ${5:variable}}'
'Set Comprehension':
'prefix': 'sc'
'body': '{${1:value} for ${2:value} in ${3:variable}}'
'PDB set trace':
'prefix': 'pdb'
'body': 'import pdb; pdb.set_trace()\n'
'iPDB set trace':
'prefix': 'ipdb'
'body': 'import ipdb; ipdb.set_trace()\n'
'rPDB set trace':
'prefix': 'rpdb'
'body': 'import rpdb2; rpdb2.start_embedded_debugger(\'${1:debug_password}\')$0'
'PuDB set trace':
'prefix': 'pudb'
'body': 'import pudb; pudb.set_trace()'
'__magic__':
'prefix': '__'
'body': '__${1:init}__'
'if __name__ == \'__main__\'':
'prefix': 'ifmain'
'body': 'if __name__ == \'__main__\':\n\t${1:main()}$0'
'.source.python:not(.string)':
'self':
'prefix': '.'
'body': 'self.'

View File

@@ -1,10 +0,0 @@
Files in this directory were copied from https://github.com/sublimehq/Packages
repository and are covered by their original license:
Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
See https://github.com/sublimehq/Packages/blob/master/LICENSE for more
details.

View File

@@ -1,9 +0,0 @@
<snippet>
<content><![CDATA[class ${1:ClassName}(${2:object}):
${3/.+/"""/}${3:docstring for $1}${3/.+/"""\n/}${3/.+/\t/}def __init__(self${4/([^,])?(.*)/(?1:, )/}${4:arg}):
${5:super($1, self).__init__()}
${4/(\A\s*,\s*\Z)|,?\s*([A-Za-z_][a-zA-Z0-9_]*)\s*(=[^,]*)?(,\s*|$)/(?2:\t\tself.$2 = $2\n)/g} $0]]></content>
<tabTrigger>class</tabTrigger>
<scope>source.python</scope>
<description>New Class</description>
</snippet>

View File

@@ -1,9 +0,0 @@
<snippet>
<content><![CDATA[property
def ${1:foo}(self):
return self.${2:_$1}
$0]]></content>
<tabTrigger>property</tabTrigger>
<scope>source.python meta.function.decorator</scope>
<description>New Property</description>
</snippet>

View File

@@ -1,13 +0,0 @@
<snippet>
<content><![CDATA[try:
${1:pass}
except${2: ${3:Exception} as ${4:e}}:
${5:raise}
else:
${6:pass}
finally:
${7:pass}]]></content>
<tabTrigger>try</tabTrigger>
<scope>source.python</scope>
<description>Try/Except/Else/Finally</description>
</snippet>

View File

@@ -1,11 +0,0 @@
<snippet>
<content><![CDATA[try:
${1:pass}
except ${2:Exception} as ${3:e}:
${4:raise $3}
else:
${5:pass}]]></content>
<tabTrigger>try</tabTrigger>
<scope>source.python</scope>
<description>Try/Except/Else</description>
</snippet>

View File

@@ -1,11 +0,0 @@
<snippet>
<content><![CDATA[try:
${1:pass}
except ${2:Exception} as ${3:e}:
${4:raise $3}
finally:
${5:pass}]]></content>
<tabTrigger>try</tabTrigger>
<scope>source.python</scope>
<description>Try/Except/Finally</description>
</snippet>

View File

@@ -1,9 +0,0 @@
<snippet>
<content><![CDATA[try:
${1:pass}
except ${2:Exception} as ${3:e}:
${4:raise $3}]]></content>
<tabTrigger>try</tabTrigger>
<scope>source.python</scope>
<description>Try/Except</description>
</snippet>

View File

@@ -1,6 +0,0 @@
<snippet>
<content><![CDATA[__${1:init}__]]></content>
<tabTrigger>__</tabTrigger>
<scope>source.python</scope>
<description>__magic__</description>
</snippet>

View File

@@ -1,11 +0,0 @@
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
<snippet>
<tabTrigger>for</tabTrigger>
<scope>source.python</scope>
<description>For Loop</description>
<content><![CDATA[
for ${1:x} in ${2:xrange(1,10)}:
${0:pass}
]]></content>
</snippet>

View File

@@ -1,8 +0,0 @@
<snippet>
<tabTrigger>def</tabTrigger>
<scope>source.python</scope>
<description>Function</description>
<content><![CDATA[def ${1:function}($2):
${0:pass}]]></content>
</snippet>

View File

@@ -1,7 +0,0 @@
<snippet>
<content><![CDATA[if __name__ == '__main__':
${1:main()}$0]]></content>
<tabTrigger>ifmain</tabTrigger>
<scope>source.python</scope>
<description>if __name__ == '__main__'</description>
</snippet>

View File

@@ -1,10 +0,0 @@
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
<snippet>
<tabTrigger>if</tabTrigger>
<scope>source.python</scope>
<description>If Condition</description>
<content><![CDATA[
if ${1:$SELECTION}:
${0:pass}
]]></content>
</snippet>

View File

@@ -1,8 +0,0 @@
<snippet>
<tabTrigger>defs</tabTrigger>
<scope>source.python</scope>
<description>Method</description>
<content><![CDATA[def ${1:function}(self${2}):
${0:pass}]]></content>
</snippet>

View File

@@ -1,6 +0,0 @@
<snippet>
<content><![CDATA[self.]]></content>
<tabTrigger>.</tabTrigger>
<scope>source.python</scope>
<description>self</description>
</snippet>

View File

@@ -1,10 +0,0 @@
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
<snippet>
<tabTrigger>while</tabTrigger>
<scope>source.python</scope>
<description>While Loop</description>
<content><![CDATA[
while ${1:$SELECTION}:
${0:pass}
]]></content>
</snippet>

View File

@@ -1,20 +0,0 @@
"""A plugin for Sublime Text to enhance f-string editing experience.
Specifically, this plugin simplifies typing of escaped curly braces
in an f-string:
{|}, where | is for cursir, gets replaced with
{{|, when '{' is typed again.
"""
# Used by `settings/sublime/Default.sublime-keymap`.
import sublime_plugin
class FstringbraceCommand(sublime_plugin.WindowCommand):
def run(self):
view = self.window.active_view()
view.run_command('right_delete')
view.run_command('insert', {'characters': '{'})

View File

@@ -1,2 +0,0 @@
This directory contains tests for Atom editor. Spec files prefixed
with `python-` are autogenerated by `make`.

View File

@@ -1,25 +0,0 @@
describe("MagicPython basic integration tests", function() {
var grammar = null;
beforeEach(function() {
waitsForPromise(function() {
return atom.packages.activatePackage("MagicPython")
});
runs(function() {
grammar = atom.grammars.grammarForScopeName("source.python")
});
});
it("recognises shebang on firstline", function() {
expect(grammar.firstLineRegex.scanner.findNextMatchSync(
"#!/usr/bin/env python")).not.toBeNull();
expect(grammar.firstLineRegex.scanner.findNextMatchSync(
"#! /usr/bin/env python")).not.toBeNull();
});
it("parses the grammar", function() {
expect(grammar).toBeDefined();
expect(grammar.scopeName).toBe("source.python");
});
});

View File

@@ -1,27 +0,0 @@
describe("python-console tests", function() {
var grammar = null;
beforeEach(function() {
waitsForPromise(function() {
return atom.packages.activatePackage("MagicPython")
});
runs(function() {
grammar = atom.grammars.grammarForScopeName("text.python.console")
});
});
it("highlights >>>", function() {
tokens = grammar.tokenizeLines(">>> print")
expect(tokens[0][0].value).toBe(">>>");
expect(tokens[0][0].scopes).toEqual(
['text.python.console', 'punctuation.separator.prompt.python.console']);
expect(tokens[0][1].value).toBe(" ");
expect(tokens[0][1].scopes).toEqual(['text.python.console']);
expect(tokens[0][2].value).toBe("print");
expect(tokens[0][2].scopes).toEqual(
['text.python.console', 'support.function.builtin.python']);
});
});

View File

@@ -1,556 +0,0 @@
// !!! autogenerated; do not edit !!!
describe("Grammar Tests", function() {
var grammar = null;
beforeEach(function() {
waitsForPromise(function() {
return atom.packages.activatePackage("MagicPython")
});
runs(function() {
grammar = atom.grammars.grammarForScopeName("source.regexp.python")
});
});
it("test/regexp/comments1.re",
function() {
tokens = grammar.tokenizeLines("foo(?#comment)bar")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("(?#");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.begin.regexp"]);
expect(tokens[0][2].value).toBe("comment");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[0][3].value).toBe(")");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.end.regexp"]);
expect(tokens[0][4].value).toBe("bar");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/comments2.re",
function() {
tokens = grammar.tokenizeLines("(?x)\n foo (?#\ncomment 1\n ) bar\n baz (?#comment 2)")
expect(tokens[0][0].value).toBe("(?x)");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","storage.modifier.flag.regexp"]);
expect(tokens[1][0].value).toBe(" foo ");
expect(tokens[1][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][1].value).toBe("(?#");
expect(tokens[1][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.begin.regexp"]);
expect(tokens[2][0].value).toBe("comment 1");
expect(tokens[2][0].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[3][0].value).toBe(" ");
expect(tokens[3][0].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[3][1].value).toBe(")");
expect(tokens[3][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.end.regexp"]);
expect(tokens[3][2].value).toBe(" bar");
expect(tokens[3][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[4][0].value).toBe(" baz ");
expect(tokens[4][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[4][1].value).toBe("(?#");
expect(tokens[4][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.begin.regexp"]);
expect(tokens[4][2].value).toBe("comment 2");
expect(tokens[4][2].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[4][3].value).toBe(")");
expect(tokens[4][3].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.end.regexp"]);
});
it("test/regexp/comments3.re",
function() {
tokens = grammar.tokenizeLines("foo(?#NOTE:comment)bar")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("(?#");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.begin.regexp"]);
expect(tokens[0][2].value).toBe("NOTE");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","comment.regexp","keyword.codetag.notation.python"]);
expect(tokens[0][3].value).toBe(":comment");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[0][4].value).toBe(")");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.end.regexp"]);
expect(tokens[0][5].value).toBe("bar");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/conditional1.re",
function() {
tokens = grammar.tokenizeLines("(<)?(\\w+@\\w+(?:\\.\\w+)+)(?(1)>|$)")
expect(tokens[0][0].value).toBe("(");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][1].value).toBe("<");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][2].value).toBe(")");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][3].value).toBe("?");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][4].value).toBe("(");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][5].value).toBe("\\w");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][6].value).toBe("+");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][7].value).toBe("@");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][8].value).toBe("\\w");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][9].value).toBe("+");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][10].value).toBe("(?:");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][11].value).toBe("\\.");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][12].value).toBe("\\w");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][13].value).toBe("+");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][14].value).toBe(")");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][15].value).toBe("+");
expect(tokens[0][15].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][16].value).toBe(")");
expect(tokens[0][16].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][17].value).toBe("(");
expect(tokens[0][17].scopes).toEqual(["source.regexp.python","keyword.operator.conditional.regexp","punctuation.parenthesis.conditional.begin.regexp"]);
expect(tokens[0][18].value).toBe("?(1)");
expect(tokens[0][18].scopes).toEqual(["source.regexp.python","keyword.operator.conditional.regexp"]);
expect(tokens[0][19].value).toBe(">");
expect(tokens[0][19].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][20].value).toBe("|");
expect(tokens[0][20].scopes).toEqual(["source.regexp.python","keyword.operator.disjunction.regexp"]);
expect(tokens[0][21].value).toBe("$");
expect(tokens[0][21].scopes).toEqual(["source.regexp.python","support.other.match.end.regexp"]);
expect(tokens[0][22].value).toBe(")");
expect(tokens[0][22].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.conditional.end.regexp keyword.operator.conditional.negative.regexp"]);
});
it("test/regexp/escaping1.re",
function() {
tokens = grammar.tokenizeLines("foo\\\nbar")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("\\");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[1][0].value).toBe("bar");
expect(tokens[1][0].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/escaping2.re",
function() {
tokens = grammar.tokenizeLines("start\\A\\b\\B\\d\\D\\s\\S\\w\\W\\Z\\\\\\1\\01\\1111\\0011\\xfab\\u123fb\\U1234aaaab\\c")
expect(tokens[0][0].value).toBe("start");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("\\A");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][2].value).toBe("\\b");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][3].value).toBe("\\B");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][4].value).toBe("\\d");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][5].value).toBe("\\D");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][6].value).toBe("\\s");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][7].value).toBe("\\S");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][8].value).toBe("\\w");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][9].value).toBe("\\W");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][10].value).toBe("\\Z");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][11].value).toBe("\\\\");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][12].value).toBe("\\1");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","meta.backreference.regexp","entity.name.tag.backreference.regexp"]);
expect(tokens[0][13].value).toBe("\\01");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][14].value).toBe("\\111");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][15].value).toBe("1");
expect(tokens[0][15].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][16].value).toBe("\\001");
expect(tokens[0][16].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][17].value).toBe("1");
expect(tokens[0][17].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][18].value).toBe("\\xfa");
expect(tokens[0][18].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][19].value).toBe("b");
expect(tokens[0][19].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][20].value).toBe("\\u123f");
expect(tokens[0][20].scopes).toEqual(["source.regexp.python","constant.character.unicode.regexp"]);
expect(tokens[0][21].value).toBe("b");
expect(tokens[0][21].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][22].value).toBe("\\U1234aaaa");
expect(tokens[0][22].scopes).toEqual(["source.regexp.python","constant.character.unicode.regexp"]);
expect(tokens[0][23].value).toBe("b");
expect(tokens[0][23].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][24].value).toBe("\\c");
expect(tokens[0][24].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
});
it("test/regexp/escaping3.re",
function() {
tokens = grammar.tokenizeLines("[start\\A\\b\\B\\d\\D\\s\\S\\w\\W\\Z\\\\\\1\\01\\1111\\0011\\xfab\\u123fb\\U1234aaaab\\c]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("s");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][2].value).toBe("t");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][3].value).toBe("a");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][4].value).toBe("r");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][5].value).toBe("t");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][6].value).toBe("\\A");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][7].value).toBe("\\b");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][8].value).toBe("\\B");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][9].value).toBe("\\d");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][10].value).toBe("\\D");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][11].value).toBe("\\s");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][12].value).toBe("\\S");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][13].value).toBe("\\w");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][14].value).toBe("\\W");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][15].value).toBe("\\Z");
expect(tokens[0][15].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][16].value).toBe("\\\\");
expect(tokens[0][16].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][17].value).toBe("\\1");
expect(tokens[0][17].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][18].value).toBe("\\01");
expect(tokens[0][18].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][19].value).toBe("\\111");
expect(tokens[0][19].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][20].value).toBe("1");
expect(tokens[0][20].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][21].value).toBe("\\001");
expect(tokens[0][21].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][22].value).toBe("1");
expect(tokens[0][22].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][23].value).toBe("\\xfa");
expect(tokens[0][23].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][24].value).toBe("b");
expect(tokens[0][24].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][25].value).toBe("\\u123f");
expect(tokens[0][25].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.unicode.regexp"]);
expect(tokens[0][26].value).toBe("b");
expect(tokens[0][26].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][27].value).toBe("\\U1234aaaa");
expect(tokens[0][27].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.unicode.regexp"]);
expect(tokens[0][28].value).toBe("b");
expect(tokens[0][28].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][29].value).toBe("\\c");
expect(tokens[0][29].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][30].value).toBe("]");
expect(tokens[0][30].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/escaping4.re",
function() {
tokens = grammar.tokenizeLines("[start\\a\\b\\c\\d\\f\\n\\r\\t\\v]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("s");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][2].value).toBe("t");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][3].value).toBe("a");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][4].value).toBe("r");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][5].value).toBe("t");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][6].value).toBe("\\a");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][7].value).toBe("\\b");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][8].value).toBe("\\c");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][9].value).toBe("\\d");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][10].value).toBe("\\f");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][11].value).toBe("\\n");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][12].value).toBe("\\r");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][13].value).toBe("\\t");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][14].value).toBe("\\v");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][15].value).toBe("]");
expect(tokens[0][15].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/flags1.re",
function() {
tokens = grammar.tokenizeLines("(?aiLmsux)foo")
expect(tokens[0][0].value).toBe("(?aiLmsux)");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","storage.modifier.flag.regexp"]);
expect(tokens[0][1].value).toBe("foo");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/group1.re",
function() {
tokens = grammar.tokenizeLines("(?x)\n (?:not) (foo)\n .* (?P<bar>BAR)\n \\1 (?P=bar)")
expect(tokens[0][0].value).toBe("(?x)");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","storage.modifier.flag.regexp"]);
expect(tokens[1][0].value).toBe(" ");
expect(tokens[1][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][1].value).toBe("(?:");
expect(tokens[1][1].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[1][2].value).toBe("not");
expect(tokens[1][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][3].value).toBe(")");
expect(tokens[1][3].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[1][4].value).toBe(" ");
expect(tokens[1][4].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][5].value).toBe("(");
expect(tokens[1][5].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[1][6].value).toBe("foo");
expect(tokens[1][6].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][7].value).toBe(")");
expect(tokens[1][7].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[2][0].value).toBe(" ");
expect(tokens[2][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[2][1].value).toBe(".");
expect(tokens[2][1].scopes).toEqual(["source.regexp.python","support.other.match.any.regexp"]);
expect(tokens[2][2].value).toBe("*");
expect(tokens[2][2].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[2][3].value).toBe(" ");
expect(tokens[2][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[2][4].value).toBe("(");
expect(tokens[2][4].scopes).toEqual(["source.regexp.python","meta.named.regexp","punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[2][5].value).toBe("?P<bar>");
expect(tokens[2][5].scopes).toEqual(["source.regexp.python","meta.named.regexp","entity.name.tag.named.group.regexp"]);
expect(tokens[2][6].value).toBe("BAR");
expect(tokens[2][6].scopes).toEqual(["source.regexp.python","meta.named.regexp"]);
expect(tokens[2][7].value).toBe(")");
expect(tokens[2][7].scopes).toEqual(["source.regexp.python","meta.named.regexp","punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[3][0].value).toBe(" ");
expect(tokens[3][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[3][1].value).toBe("\\1");
expect(tokens[3][1].scopes).toEqual(["source.regexp.python","meta.backreference.regexp","entity.name.tag.backreference.regexp"]);
expect(tokens[3][2].value).toBe(" ");
expect(tokens[3][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[3][3].value).toBe("(");
expect(tokens[3][3].scopes).toEqual(["source.regexp.python","meta.backreference.named.regexp","punctuation.parenthesis.backreference.named.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[3][4].value).toBe("?P=bar");
expect(tokens[3][4].scopes).toEqual(["source.regexp.python","meta.backreference.named.regexp","entity.name.tag.named.backreference.regexp"]);
expect(tokens[3][5].value).toBe(")");
expect(tokens[3][5].scopes).toEqual(["source.regexp.python","meta.backreference.named.regexp","punctuation.parenthesis.backreference.named.end.regexp support.other.parenthesis.regexp"]);
});
it("test/regexp/lookahead1.re",
function() {
tokens = grammar.tokenizeLines("foo(?=bar)")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("(");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","keyword.operator.lookahead.regexp","punctuation.parenthesis.lookahead.begin.regexp"]);
expect(tokens[0][2].value).toBe("?=");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","keyword.operator.lookahead.regexp"]);
expect(tokens[0][3].value).toBe("bar");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][4].value).toBe(")");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"]);
});
it("test/regexp/lookahead2.re",
function() {
tokens = grammar.tokenizeLines("foo(?!bar)")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("(");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","keyword.operator.lookahead.negative.regexp","punctuation.parenthesis.lookahead.begin.regexp"]);
expect(tokens[0][2].value).toBe("?!");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","keyword.operator.lookahead.negative.regexp"]);
expect(tokens[0][3].value).toBe("bar");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][4].value).toBe(")");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"]);
});
it("test/regexp/lookbehind1.re",
function() {
tokens = grammar.tokenizeLines("(?<=foo)bar")
expect(tokens[0][0].value).toBe("(");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","keyword.operator.lookbehind.regexp","punctuation.parenthesis.lookbehind.begin.regexp"]);
expect(tokens[0][1].value).toBe("?<=");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","keyword.operator.lookbehind.regexp"]);
expect(tokens[0][2].value).toBe("foo");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][3].value).toBe(")");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"]);
expect(tokens[0][4].value).toBe("bar");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/lookbehind2.re",
function() {
tokens = grammar.tokenizeLines("(?<!foo)bar")
expect(tokens[0][0].value).toBe("(");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","keyword.operator.lookbehind.negative.regexp","punctuation.parenthesis.lookbehind.begin.regexp"]);
expect(tokens[0][1].value).toBe("?<!");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","keyword.operator.lookbehind.negative.regexp"]);
expect(tokens[0][2].value).toBe("foo");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][3].value).toBe(")");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.negative.regexp"]);
expect(tokens[0][4].value).toBe("bar");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/quantifiers1.re",
function() {
tokens = grammar.tokenizeLines("^a+b*c?d*?e+?f??$")
expect(tokens[0][0].value).toBe("^");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","support.other.match.begin.regexp"]);
expect(tokens[0][1].value).toBe("a");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][2].value).toBe("+");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][3].value).toBe("b");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][4].value).toBe("*");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][5].value).toBe("c");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][6].value).toBe("?");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][7].value).toBe("d");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][8].value).toBe("*?");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][9].value).toBe("e");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][10].value).toBe("+?");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][11].value).toBe("f");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][12].value).toBe("??");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][13].value).toBe("$");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","support.other.match.end.regexp"]);
});
it("test/regexp/quantifiers2.re",
function() {
tokens = grammar.tokenizeLines("^a{10}b{,10}c{10,}d{10,100}$")
expect(tokens[0][0].value).toBe("^");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","support.other.match.begin.regexp"]);
expect(tokens[0][1].value).toBe("a");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][2].value).toBe("{10}");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][3].value).toBe("b");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][4].value).toBe("{,10}");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][5].value).toBe("c");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][6].value).toBe("{10,}");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][7].value).toBe("d");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][8].value).toBe("{10,100}");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][9].value).toBe("$");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","support.other.match.end.regexp"]);
});
it("test/regexp/set1.re",
function() {
tokens = grammar.tokenizeLines("[]]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("]");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][2].value).toBe("]");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/set2.re",
function() {
tokens = grammar.tokenizeLines("[^]]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("^");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","keyword.operator.negation.regexp"]);
expect(tokens[0][2].value).toBe("]");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][3].value).toBe("]");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/set3.re",
function() {
tokens = grammar.tokenizeLines("[][(){}|*+?.\\]\\\\]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("]");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][2].value).toBe("[");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][3].value).toBe("(");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][4].value).toBe(")");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][5].value).toBe("{");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][6].value).toBe("}");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][7].value).toBe("|");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][8].value).toBe("*");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][9].value).toBe("+");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][10].value).toBe("?");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][11].value).toBe(".");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][12].value).toBe("\\]");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][13].value).toBe("\\\\");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][14].value).toBe("]");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/set4.re",
function() {
tokens = grammar.tokenizeLines("^[^^]")
expect(tokens[0][0].value).toBe("^");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","support.other.match.begin.regexp"]);
expect(tokens[0][1].value).toBe("[");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][2].value).toBe("^");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","keyword.operator.negation.regexp"]);
expect(tokens[0][3].value).toBe("^");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][4].value).toBe("]");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/trivial.re",
function() {
tokens = grammar.tokenizeLines("trivial")
expect(tokens[0][0].value).toBe("trivial");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
});
});

View File

@@ -1,46 +0,0 @@
describe("python-traceback tests", function() {
var grammar = null;
beforeEach(function() {
waitsForPromise(function() {
return atom.packages.activatePackage("MagicPython")
});
runs(function() {
grammar = atom.grammars.grammarForScopeName("text.python.traceback")
});
});
it("highlights a traceback line", function() {
tokens = grammar.tokenizeLines(
' File "t.py", line 1, in <module>\n' +
' a = 1/0')
expect(tokens[0][0].value).toBe(" File ");
expect(tokens[0][0].scopes).toEqual(['text.python.traceback']);
expect(tokens[0][1].value).toBe('"t.py"');
expect(tokens[0][1].scopes).toEqual(
['text.python.traceback', 'string.python.traceback']);
expect(tokens[0][2].value).toBe(", line ");
expect(tokens[0][2].scopes).toEqual(['text.python.traceback']);
expect(tokens[0][3].value).toBe("1");
expect(tokens[0][3].scopes).toEqual(
['text.python.traceback', 'constant.numeric.python.traceback']);
expect(tokens[0][4].value).toBe(", in ");
expect(tokens[0][4].scopes).toEqual(['text.python.traceback']);
expect(tokens[0][5].value).toBe("<module>");
expect(tokens[0][5].scopes).toEqual(
['text.python.traceback', 'entity.name.function.python.traceback']);
expect(tokens[1][1].value).toBe("a");
expect(tokens[1][1].scopes).toEqual(['text.python.traceback']);
expect(tokens[1][3].value).toBe("=");
expect(tokens[1][3].scopes).toEqual(
['text.python.traceback', 'keyword.operator.assignment.python']);
});
});

View File

@@ -1,43 +0,0 @@
AttributeError ConnectionAbortedError
PendingDeprecationWarning
ModuleNotFoundError
SystemExit
NotImplemented True None False Ellipsis
Warning
Exception BaseException
sum oct abs type object print exec
AttributeError : source.python, support.type.exception.python
: source.python
ConnectionAbortedError : source.python, support.type.exception.python
PendingDeprecationWarning : source.python, support.type.exception.python
ModuleNotFoundError : source.python, support.type.exception.python
SystemExit : source.python, support.type.exception.python
NotImplemented : constant.language.python, source.python
: source.python
True : constant.language.python, source.python
: source.python
None : constant.language.python, source.python
: source.python
False : constant.language.python, source.python
: source.python
Ellipsis : constant.language.python, source.python
Warning : source.python, support.type.exception.python
Exception : source.python, support.type.exception.python
: source.python
BaseException : source.python, support.type.exception.python
sum : source.python, support.function.builtin.python
: source.python
oct : source.python, support.function.builtin.python
: source.python
abs : source.python, support.function.builtin.python
: source.python
type : source.python, support.type.python
: source.python
object : source.python, support.type.python
: source.python
print : source.python, support.function.builtin.python
: source.python
exec : source.python, support.function.builtin.python

View File

@@ -1,27 +0,0 @@
Error
file reduce intern raw_input unicode cmp basestring execfile long xrange apply
Error : source.python
file : source.python, variable.legacy.builtin.python
: source.python
reduce : source.python, variable.legacy.builtin.python
: source.python
intern : source.python, variable.legacy.builtin.python
: source.python
raw_input : source.python, variable.legacy.builtin.python
: source.python
unicode : source.python, variable.legacy.builtin.python
: source.python
cmp : source.python, variable.legacy.builtin.python
: source.python
basestring : source.python, variable.legacy.builtin.python
: source.python
execfile : source.python, variable.legacy.builtin.python
: source.python
long : source.python, variable.legacy.builtin.python
: source.python
xrange : source.python, variable.legacy.builtin.python
: source.python
apply : source.python

View File

@@ -1,186 +0,0 @@
__all__ = ['bar', 'baz']
some.__bases__
some.__class__
assert __debug__
__builtins__
__builtins__.len
print(__builtins__)
some.__dict__
some.__doc__
some.__file__
some.__members__
some.__metaclass__
some.__methods__
some.__module__
some.__mro__
some.__name__
some.__slots__
some.__subclasses__
some.__version__
some.__weakref__
some.__qualname__
some.__code__
some.__wrapped__
some.__signature__
some.__defaults__
some.__func__
some.__self__
some.__kwdefaults__
some.__matmul__
some.__imatmul__
some.__rmatmul__
some.__annotations__
some.__init_subclass__
some.__set_name__
some.__fspath__
some.__classcell__
some.__bytes__
some.__spec__
some.__path__
some.__prepare__
some.__package__
some.__traceback__
some.__notspecial__
__all__ : source.python, support.variable.magic.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
[ : punctuation.definition.list.begin.python, source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
bar : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : punctuation.separator.element.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
baz : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
] : punctuation.definition.list.end.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
__bases__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__class__ : source.python, support.variable.magic.python
assert : keyword.control.flow.python, source.python
: source.python
__debug__ : source.python, support.variable.magic.python
__builtins__ : source.python, support.variable.magic.python
__builtins__ : source.python, support.variable.magic.python
. : punctuation.separator.period.python, source.python
len : source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
__builtins__ : meta.function-call.arguments.python, meta.function-call.python, source.python, support.variable.magic.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
__dict__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__doc__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__file__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__members__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__metaclass__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__methods__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__module__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__mro__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__name__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__slots__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__subclasses__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__version__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__weakref__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__qualname__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__code__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__wrapped__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__signature__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__defaults__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__func__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__self__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__kwdefaults__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__matmul__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__imatmul__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__rmatmul__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__annotations__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__init_subclass__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__set_name__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__fspath__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__classcell__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__bytes__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__spec__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__path__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__prepare__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__package__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__traceback__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__notspecial__ : source.python

View File

@@ -1,27 +0,0 @@
some.int
some.sum
some.super
some.unicode
some.foo
some.Exception
some : source.python
. : punctuation.separator.period.python, source.python
int : source.python
some : source.python
. : punctuation.separator.period.python, source.python
sum : source.python
some : source.python
. : punctuation.separator.period.python, source.python
super : source.python
some : source.python
. : punctuation.separator.period.python, source.python
unicode : source.python
some : source.python
. : punctuation.separator.period.python, source.python
foo : source.python
some : source.python
. : punctuation.separator.period.python, source.python
Exception : source.python

View File

@@ -1,26 +0,0 @@
some. True
some. \
True
True
some.
True
some : source.python
. : punctuation.separator.period.python, source.python
: source.python
True : keyword.illegal.name.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
: source.python
True : keyword.illegal.name.python, source.python
True : constant.language.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
: source.python
: source.python
True : keyword.illegal.name.python, source.python

View File

@@ -1,13 +0,0 @@
exec()
exec(code_obj)
exec : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
exec : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
code_obj : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,8 +0,0 @@
breakpoint()
breakpoint : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,39 +0,0 @@
some_call(A, b, c[1], *args, FOO=lambda:{'q': 42}, **kwargs)
some_call : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
A : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
b : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
c : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.python, source.python
[ : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, meta.item-access.arguments.python, meta.item-access.python, source.python
] : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.python, punctuation.definition.arguments.end.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
args : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
FOO : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
lambda : meta.function-call.arguments.python, meta.function-call.python, meta.lambda-function.python, source.python, storage.type.function.lambda.python
: : meta.function-call.arguments.python, meta.function-call.python, meta.lambda-function.python, punctuation.section.function.lambda.begin.python, source.python
{ : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.dict.begin.python, source.python
' : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
q : meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
' : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
: : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.dict.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
42 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
} : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.dict.end.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
kwargs : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,32 +0,0 @@
x = foo(True,
3 * 4,
*a,
**bar)
x : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
foo : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
True : constant.language.python, meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
3 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.arithmetic.python, meta.function-call.arguments.python, meta.function-call.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
4 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,10 +0,0 @@
foo(from=1)
foo : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
from : keyword.control.flow.python, meta.function-call.arguments.python, meta.function-call.python, source.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,20 +0,0 @@
foo.class(a)
foo.and()
foo.if
foo : source.python
. : punctuation.separator.period.python, source.python
class : keyword.control.flow.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
and : keyword.control.flow.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
if : keyword.control.flow.python, source.python

View File

@@ -1,31 +0,0 @@
foo.1
foo(bar=baz)(ham=sam)
foo.None and foo.None.baz
foo : source.python
. : punctuation.separator.period.python, source.python
1 : source.python
foo : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
baz : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.end.python, source.python
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
ham : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
sam : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
None : keyword.illegal.name.python, source.python
: source.python
and : keyword.operator.logical.python, source.python
: source.python
foo : source.python
. : punctuation.separator.period.python, source.python
None : keyword.illegal.name.python, source.python
. : punctuation.separator.period.python, source.python
baz : source.python

View File

@@ -1,15 +0,0 @@
f(*a)
f(**a)
f : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
f : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,29 +0,0 @@
f( *a , *())
f( **a , **{})
f : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.begin.python, source.python
) : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.end.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
f : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
{ : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.dict.begin.python, source.python
} : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.dict.end.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,49 +0,0 @@
foo.__class__ (foo=bar)
foo.__class__(foo=bar)
foo.__add__ (foo=bar)
foo.__add__(foo=bar)
foo.__class__ 1
foo : source.python
. : punctuation.separator.period.python, source.python
__class__ : meta.function-call.python, source.python, support.variable.magic.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__class__ : meta.function-call.python, source.python, support.variable.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__add__ : meta.function-call.python, source.python, support.function.magic.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__add__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__class__ : source.python, support.variable.magic.python
: source.python
1 : constant.numeric.dec.python, source.python

View File

@@ -1,45 +0,0 @@
foo. __class__(foo=bar)
foo. __class__ (foo=bar)
foo. __add__ (foo=bar)
foo. __add__(foo=bar)
foo : source.python
. : punctuation.separator.period.python, source.python
: source.python
__class__ : meta.function-call.python, source.python, support.variable.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
: source.python
__class__ : meta.function-call.python, source.python, support.variable.magic.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
: source.python
__add__ : meta.function-call.python, source.python, support.function.magic.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
: source.python
__add__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,10 +0,0 @@
foo(type=1)
foo : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
type : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,94 +0,0 @@
print "is", 2*2
print("is", 2*2)
print x,
print(x, end=" ")
print
print()
print >>sys.stderr, "er"
print("er", file=sys.stderr)
print (x, y)
print((x, y))
print : source.python, support.function.builtin.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
is : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : punctuation.separator.element.python, source.python
: source.python
2 : constant.numeric.dec.python, source.python
* : keyword.operator.arithmetic.python, source.python
2 : constant.numeric.dec.python, source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
is : meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
2 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.arithmetic.python, meta.function-call.arguments.python, meta.function-call.python, source.python
2 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : source.python, support.function.builtin.python
: source.python
x : source.python
, : punctuation.separator.element.python, source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
x : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
end : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
: meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : source.python, support.function.builtin.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : source.python, support.function.builtin.python
: source.python
>> : keyword.operator.bitwise.python, source.python
sys : source.python
. : punctuation.separator.period.python, source.python
stderr : source.python
, : punctuation.separator.element.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
er : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
er : meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
file : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
sys : meta.function-call.arguments.python, meta.function-call.python, source.python
. : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.period.python, source.python
stderr : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : meta.function-call.python, source.python, support.function.builtin.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
x : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
y : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.begin.python, source.python
x : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.element.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
y : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.end.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,14 +0,0 @@
class Foo -> None: pass
class : source.python, storage.type.class.python
: source.python
Foo : source.python
: source.python
-> : invalid.illegal.annotation.python, source.python
: source.python
None : constant.language.python, source.python
: : punctuation.separator.colon.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,30 +0,0 @@
class Foo(Bar(q=1) (w=2) (e=3)): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Bar : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, meta.function-call.python, source.python
( : meta.class.inheritance.python, meta.class.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
q : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
( : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
w : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
2 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
( : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
e : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
3 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.class.inheritance.python, meta.class.python, meta.function-call.python, punctuation.definition.arguments.end.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,80 +0,0 @@
class F:
def __init__(self, a, b=1):
self.a = a
self.b = b
print(self)
self()
a.self = 1
a.self.bar = 2
self[123]
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
F : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
__init__ : meta.function.python, source.python, support.function.magic.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
self : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.self.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
b : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
= : keyword.operator.python, meta.function.parameters.python, meta.function.python, source.python
1 : constant.numeric.dec.python, meta.function.parameters.python, meta.function.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
self : source.python, variable.language.special.self.python
. : punctuation.separator.period.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
a : source.python
: source.python
self : source.python, variable.language.special.self.python
. : punctuation.separator.period.python, source.python
b : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python
: source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
self : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.language.special.self.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
self : meta.function-call.python, source.python, variable.language.special.self.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
a : source.python
. : punctuation.separator.period.python, source.python
self : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
a : source.python
. : punctuation.separator.period.python, source.python
self : source.python
. : punctuation.separator.period.python, source.python
bar : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
2 : constant.numeric.dec.python, source.python
: source.python
self : meta.item-access.python, source.python, variable.language.special.self.python
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
123 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,87 +0,0 @@
class F:
@classmethod
def meth(cls, a, b=1):
cls.a = a
cls.b = b
print(cls)
cls()
cls + 1
a.cls = 1
a.cls.__name__
cls[123]
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
F : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: meta.function.decorator.python, source.python
@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python
classmethod : meta.function.decorator.python, source.python, support.type.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
meth : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
cls : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.cls.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
b : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
= : keyword.operator.python, meta.function.parameters.python, meta.function.python, source.python
1 : constant.numeric.dec.python, meta.function.parameters.python, meta.function.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
cls : source.python, variable.language.special.cls.python
. : punctuation.separator.period.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
a : source.python
: source.python
cls : source.python, variable.language.special.cls.python
. : punctuation.separator.period.python, source.python
b : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python
: source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
cls : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.language.special.cls.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
cls : meta.function-call.python, source.python, variable.language.special.cls.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
cls : source.python, variable.language.special.cls.python
: source.python
+ : keyword.operator.arithmetic.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
a : source.python
. : punctuation.separator.period.python, source.python
cls : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
a : source.python
. : punctuation.separator.period.python, source.python
cls : source.python
. : punctuation.separator.period.python, source.python
__name__ : source.python, support.variable.magic.python
: source.python
cls : meta.item-access.python, source.python, variable.language.special.cls.python
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
123 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,18 +0,0 @@
class A(*a, **b): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
A : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.class.inheritance.python, meta.class.python, source.python
a : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.class.inheritance.python, meta.class.python, source.python
b : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,34 +0,0 @@
class F(f.Exception, f.type, Exception, Exception.a, b=Exception):
pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
F : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
f : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
Exception : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
f : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
type : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
Exception : meta.class.inheritance.python, meta.class.python, source.python, support.type.exception.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
Exception : meta.class.inheritance.python, meta.class.python, source.python, support.type.exception.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
a : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
b : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python, variable.parameter.class.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
Exception : meta.class.inheritance.python, meta.class.python, source.python, support.type.exception.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,19 +0,0 @@
class Spam(Foo, from==12):
pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Spam : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Foo : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
from : keyword.control.flow.python, meta.class.inheritance.python, meta.class.python, source.python
== : keyword.operator.comparison.python, meta.class.inheritance.python, meta.class.python, source.python
12 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,26 +0,0 @@
class Foo(Bar, str, type=12, metaclass=FooMeta): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Bar : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
str : meta.class.inheritance.python, meta.class.python, source.python, support.type.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
type : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python, variable.parameter.class.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
12 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
metaclass : meta.class.inheritance.python, meta.class.python, source.python, support.type.metaclass.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
FooMeta : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,38 +0,0 @@
@dec
# Bar.name=... is not legal, but the test is for highlighter not breaking badly
class Spam(Foo.Bar, Bar.name={'very': 'odd'}):
pass
@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python
dec : entity.name.function.decorator.python, meta.function.decorator.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
Bar.name=... is not legal, but the test is for highlighter not breaking badly : comment.line.number-sign.python, source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Spam : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Foo : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
Bar : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
Bar : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
name : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
{ : meta.class.inheritance.python, meta.class.python, punctuation.definition.dict.begin.python, source.python
' : meta.class.inheritance.python, meta.class.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
very : meta.class.inheritance.python, meta.class.python, source.python, string.quoted.single.python
' : meta.class.inheritance.python, meta.class.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
: : meta.class.inheritance.python, meta.class.python, punctuation.separator.dict.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
' : meta.class.inheritance.python, meta.class.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
odd : meta.class.inheritance.python, meta.class.python, source.python, string.quoted.single.python
' : meta.class.inheritance.python, meta.class.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
} : meta.class.inheritance.python, meta.class.python, punctuation.definition.dict.end.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,19 +0,0 @@
class Spam(Foo, from=12):
pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Spam : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Foo : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
from : keyword.control.flow.python, meta.class.inheritance.python, meta.class.python, source.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
12 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,11 +0,0 @@
class Exception: pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Exception : meta.class.python, source.python, support.type.exception.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,16 +0,0 @@
class Foo(Exception, MyObj): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Exception : meta.class.inheritance.python, meta.class.python, source.python, support.type.exception.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
MyObj : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,15 +0,0 @@
class Foo(metaclass=FooMeta): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
metaclass : meta.class.inheritance.python, meta.class.python, source.python, support.type.metaclass.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
FooMeta : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,13 +0,0 @@
class class:
pass
# doesn't break
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
class : keyword.control.flow.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
doesn't break : comment.line.number-sign.python, source.python

View File

@@ -1,30 +0,0 @@
class None: pass
class True(False): pass
class False(object): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
None : keyword.illegal.name.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
True : keyword.illegal.name.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
False : constant.language.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
False : keyword.illegal.name.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
object : meta.class.inheritance.python, meta.class.python, source.python, support.type.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -1,16 +0,0 @@
class Foo:
__slots__ = ()
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
__slots__ : source.python, support.variable.magic.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
( : punctuation.parenthesis.begin.python, source.python
) : punctuation.parenthesis.end.python, source.python

View File

@@ -1,99 +0,0 @@
class Foo:
def __init__(self):
super().__init__(foo=1)
super(). __init__(foo=1)
super(). \
__init__(foo=1)
__init__(foo=1)
foo.__init__(bar=1)
__init__(bar=1)
if:
__init__(bar=1)
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
__init__ : meta.function.python, source.python, support.function.magic.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
self : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.self.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
super : meta.function-call.python, source.python, support.type.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
. : punctuation.separator.period.python, source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
super : meta.function-call.python, source.python, support.type.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
. : punctuation.separator.period.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
super : meta.function-call.python, source.python, support.type.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
. : punctuation.separator.period.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
: source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
if : keyword.control.flow.python, source.python
: : punctuation.separator.colon.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -1,31 +0,0 @@
# XXX foo
# FIXME: bug
# NB: XXXx xXXX but XXX!
# ALSO HACK and NOTE and TODO highlight XXX and FIXME.
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
: comment.line.number-sign.python, source.python
XXX : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
foo : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
: comment.line.number-sign.python, source.python
FIXME : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
: bug : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
NB: XXXx xXXX but : comment.line.number-sign.python, source.python
XXX : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
! : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
ALSO : comment.line.number-sign.python, source.python
HACK : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
and : comment.line.number-sign.python, source.python
NOTE : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
and : comment.line.number-sign.python, source.python
TODO : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
highlight : comment.line.number-sign.python, source.python
XXX : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
and : comment.line.number-sign.python, source.python
FIXME : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
. : comment.line.number-sign.python, source.python

View File

@@ -1,45 +0,0 @@
# type: ignore # test
# type: ignore
# type:ignore
#type:ignore
# type: ignore 1
# type: 1 ignore
# type : ignore
##type: ignore
#.type: ignore
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
test : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.variable.notation.python, meta.typehint.comment.python, source.python
1 : comment.line.number-sign.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
1 : comment.line.number-sign.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.variable.notation.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
type : ignore : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
#type: ignore : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
.type: ignore : comment.line.number-sign.python, source.python

View File

@@ -1,21 +0,0 @@
a = 1 # type:
a = 1 # type: # 123
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
type: : comment.line.number-sign.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
type: # 123 : comment.line.number-sign.python, source.python

View File

@@ -1,6 +0,0 @@
# abc type: def
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
abc type: def : comment.line.number-sign.python, source.python

Some files were not shown because too many files have changed in this diff Show More