mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-06 12:54:29 +08:00
Remove some Python 3.6 references
This commit is contained in:
@@ -31,7 +31,7 @@ A simple example:
|
||||
.. code-block:: python
|
||||
|
||||
>>> import parso
|
||||
>>> module = parso.parse('hello + 1', version="3.6")
|
||||
>>> module = parso.parse('hello + 1', version="3.9")
|
||||
>>> expr = module.children[0]
|
||||
>>> expr
|
||||
PythonNode(arith_expr, [<Name: hello@1,0>, <Operator: +>, <Number: 1>])
|
||||
|
||||
@@ -273,7 +273,7 @@ autodoc_default_flags = []
|
||||
# -- Options for intersphinx module --------------------------------------------
|
||||
|
||||
intersphinx_mapping = {
|
||||
'http://docs.python.org/': ('https://docs.python.org/3.6', None),
|
||||
'http://docs.python.org/': ('https://docs.python.org/3.8', None),
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Parso consists of a small API to parse Python and analyse the syntax tree.
|
||||
A simple example:
|
||||
|
||||
>>> import parso
|
||||
>>> module = parso.parse('hello + 1', version="3.6")
|
||||
>>> module = parso.parse('hello + 1', version="3.9")
|
||||
>>> expr = module.children[0]
|
||||
>>> expr
|
||||
PythonNode(arith_expr, [<Name: hello@1,0>, <Operator: +>, <Number: 1>])
|
||||
|
||||
@@ -18,7 +18,7 @@ class GrammarParser():
|
||||
self._bnf_grammar = bnf_grammar
|
||||
self.generator = tokenize(
|
||||
bnf_grammar,
|
||||
version_info=parse_version_string('3.6')
|
||||
version_info=parse_version_string('3.9')
|
||||
)
|
||||
self._gettoken() # Initialize lookahead
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ FAILING_EXAMPLES = [
|
||||
'lambda x=3, y: x',
|
||||
'__debug__ = 1',
|
||||
'with x() as __debug__: pass',
|
||||
# Mostly 3.6 relevant
|
||||
|
||||
'[]: int',
|
||||
'[a, b]: int',
|
||||
'(): int',
|
||||
|
||||
@@ -74,7 +74,7 @@ def test_invalid_token():
|
||||
|
||||
|
||||
def test_invalid_token_in_fstr():
|
||||
module = load_grammar(version='3.6').parse('f"{a + ? + b}"')
|
||||
module = load_grammar(version='3.9').parse('f"{a + ? + b}"')
|
||||
error_node, q, plus_b, error1, error2, endmarker = module.children
|
||||
assert error_node.get_code() == 'f"{a +'
|
||||
assert q.value == '?'
|
||||
|
||||
@@ -184,7 +184,6 @@ def test_ur_literals():
|
||||
check('bR""')
|
||||
check('Rb""')
|
||||
|
||||
# Starting with Python 3.6 format strings where introduced.
|
||||
check('fr""')
|
||||
check('rF""')
|
||||
check('f""')
|
||||
|
||||
Reference in New Issue
Block a user