Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 9314882

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 5d54870 + 2ba8196 commit 9314882

File tree

6 files changed

+67
-74
lines changed

6 files changed

+67
-74
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: ci
2+
on:
3+
- pull_request
4+
- push
5+
6+
jobs:
7+
Test:
8+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os:
14+
- ubuntu-latest
15+
- macos-latest
16+
- windows-latest
17+
atom_channel:
18+
- stable
19+
- nightly
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Cache
23+
uses: actions/cache@v2
24+
with:
25+
path: |
26+
'node_modules'
27+
'C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140'
28+
key: ${{ runner.os }}-${{ matrix.atom_channel }}-${{ hashFiles('package.json') }}
29+
30+
- uses: UziTech/action-setup-atom@v1
31+
with:
32+
channel: ${{ matrix.atom_channel }}
33+
34+
- name: Install Visual Studio 2015 on Windows
35+
if: ${{ contains(matrix.os, 'windows') }}
36+
run: |
37+
choco install visualcpp-build-tools --version=14.0.25420.1 --ignore-dependencies -y --params "'/IncludeRequired'"
38+
echo ::set-env name=VCTargetsPath::'C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140'
39+
40+
- name: Install dependencies
41+
run: apm install
42+
43+
- name: Run tests
44+
run: apm test
45+
46+
Skip:
47+
if: contains(github.event.head_commit.message, '[skip ci]')
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Skip CI 🚫
51+
run: echo skip ci

.travis.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Python language support in Atom
2-
[![macOS Build Status](https://travis-ci.org/atom/language-python.svg?branch=master)](https://travis-ci.org/atom/language-python)
3-
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/hmxrb9jttjh41es9/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-python/branch/master)
2+
![ci](https://github.com/atom/language-python/workflows/ci/badge.svg)
43
[![Dependency Status](https://david-dm.org/atom/language-python.svg)](https://david-dm.org/atom/language-python)
54

65
Adds syntax highlighting and snippets to Python files in Atom.

appveyor.yml

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
1-
version: "{build}"
2-
3-
image: Visual Studio 2015
4-
5-
platform: x64
1+
# empty appveyor
2+
build: off
63

74
branches:
8-
only:
9-
- master
10-
11-
clone_depth: 10
12-
13-
skip_tags: true
14-
15-
environment:
16-
APM_TEST_PACKAGES:
17-
18-
matrix:
19-
- ATOM_CHANNEL: stable
20-
- ATOM_CHANNEL: beta
21-
22-
install:
23-
- ps: Install-Product node 4
24-
25-
build_script:
26-
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1'))
27-
28-
test: off
29-
deploy: off
5+
only:
6+
- non-existing

grammars/python.cson

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@
16431643
'name': 'string.quoted.double.block.python'
16441644
'patterns': [
16451645
{
1646-
'begin': '(?=\\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|WITH))'
1646+
'begin': '(?=\\s*(SELECT|INSERT|UPDATE|DELETE(?! \/)|CREATE|REPLACE|ALTER|WITH))'
16471647
'name': 'meta.embedded.sql'
16481648
'end': '(?=\\s*""")'
16491649
'patterns': [
@@ -1655,7 +1655,7 @@
16551655
]
16561656
}
16571657
{
1658-
'begin': '(")(?=\\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|WITH))'
1658+
'begin': '(")(?=\\s*(SELECT|INSERT|UPDATE|DELETE(?! \/)|CREATE|REPLACE|ALTER|WITH))'
16591659
'beginCaptures':
16601660
'1':
16611661
'name': 'punctuation.definition.string.begin.python'
@@ -2214,7 +2214,7 @@
22142214
'name': 'string.quoted.single.block.python'
22152215
'patterns': [
22162216
{
2217-
'begin': '(?=\\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|WITH))'
2217+
'begin': '(?=\\s*(SELECT|INSERT|UPDATE|DELETE(?! \/)|CREATE|REPLACE|ALTER|WITH))'
22182218
'end': '(?=\\s*\'\'\')'
22192219
'name': 'meta.embedded.sql'
22202220
'patterns': [
@@ -2226,7 +2226,7 @@
22262226
]
22272227
}
22282228
{
2229-
'begin': '(\')(?=\\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|WITH))'
2229+
'begin': '(\')(?=\\s*(SELECT|INSERT|UPDATE|DELETE(?! \/)|CREATE|REPLACE|ALTER|WITH))'
22302230
'beginCaptures':
22312231
'1':
22322232
'name': 'punctuation.definition.string.begin.python'

spec/python-spec.coffee

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,3 +750,10 @@ describe "Python grammar", ->
750750
expect(tokens[13]).toEqual value: ')', scopes: ['source.python', 'string.quoted.double.single-line.sql.python', 'meta.embedded.sql', 'punctuation.definition.section.bracket.round.end.sql']
751751
expect(tokens[15]).toEqual value: '"', scopes: ['source.python', 'string.quoted.double.single-line.sql.python', 'punctuation.definition.string.end.python']
752752
expect(tokens[17]).toEqual value: '%', scopes: ['source.python', 'keyword.operator.arithmetic.python']
753+
754+
it "recognizes DELETE as an HTTP method", ->
755+
{tokens} = grammar.tokenizeLine('"DELETE /api/v1/endpoint"')
756+
757+
expect(tokens[0]).toEqual value: '"', scopes: ['source.python', 'string.quoted.double.single-line.python', 'punctuation.definition.string.begin.python']
758+
expect(tokens[1]).toEqual value: 'DELETE /api/v1/endpoint', scopes: ['source.python', 'string.quoted.double.single-line.python']
759+
expect(tokens[2]).toEqual value: '"', scopes: ['source.python', 'string.quoted.double.single-line.python', 'punctuation.definition.string.end.python']

0 commit comments

Comments
 (0)