View
@@ -10,8 +10,6 @@
cmd_parse.py - Parse high level shell commands.
"""
import sys
from asdl import const
from core import braces
View
@@ -6,11 +6,8 @@
import sys
import unittest
from asdl import py_meta
from core import ui
from core.id_kind import Id
from core.alloc import Pool
from core import word
from core import test_lib
View
@@ -103,10 +103,10 @@
import re
from core.id_kind import Id, Kind, ID_SPEC
from core import util
from core.lexer import C, R
from osh import ast_ as ast
lex_mode_e = ast.lex_mode_e
View
@@ -5,9 +5,8 @@
import unittest
from core import alloc
from core.id_kind import Id, Kind, LookupKind
from core.lexer import CompileAll, Lexer, LineLexer
from core.lexer import CompileAll, LineLexer
from core import test_lib
from osh import parse_lib
View
@@ -2,8 +2,6 @@
parse_lib.py - Consolidate various parser instantiations here.
"""
import sys
from core import lexer
from core import reader
from core import id_kind
View
@@ -429,9 +429,7 @@ def _ReadBracedBracedVarSub(self, d_quoted=False):
self._Next(lex_mode_e.VS_1)
self._Peek()
debug_token = self.cur_token
ty = self.token_type
#print("T", debug_token)
if ty == Id.VSub_Pound:
# Disambiguate
View
@@ -15,8 +15,8 @@
from core import alloc
from core.id_kind import Id
from core import word
from core import test_lib
from core import word
from osh import ast_ as ast
from osh import parse_lib
@@ -491,8 +491,6 @@ def testMultiLine(self):
test_lib.AssertAsdlEqual(self, ast.TokenWord(t), w)
def testParseErrorLocation(self):
from core import word
w = _assertSpanForWord(self, 'a=(1 2 3)')
w = _assertSpanForWord(self, 'foo')
View
@@ -99,12 +99,19 @@ bin-flake8() {
flake8-all() {
local -a dirs=(asdl bin core osh)
# stop the build if there are Python syntax errors or undefined names
# Step 1: Stop the build if there are Python syntax errors or undefined names
bin-flake8 "${dirs[@]}" \
--count --select=E901,E999,F821,F822,F823 --show-source --statistics
--count --select=E901,E999,F821,F822,F823,F401 --show-source --statistics
# Step 2: Style errors as warnings.
local ignored='E125,E701,E241,E121,E111,E114,E128,E262,E226,E302,E265,E290,E202,E203,C901'
# trailing whitespace, line too long, blank lines
local ignored_for_now='W291,E501,E303'
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
bin-flake8 "${dirs[@]}" \
--ignore="$ignored,$ignored_for_now" \
--count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
}