Compare commits

..

20 Commits

Author SHA1 Message Date
David Peter
5a6bfca0ed [ty] Simplify Self for final types 2025-10-23 10:34:51 +02:00
Micha Reiser
e92fd51a2c [ty] Add cycle handling to lazy_default (#20967) 2025-10-23 10:05:08 +02:00
Eric Mark Martin
c3631c78bd [ty] Add docstrings for ty_extensions functions (#21036)
Co-authored-by: David Peter <sharkdp@users.noreply.github.com>
2025-10-23 09:50:21 +02:00
David Peter
589e8ac0d9 [ty] Infer type for implicit self parameters in method bodies (#20922)
## Summary

Infer a type of `Self` for unannotated `self` parameters in methods of
classes.

part of https://github.com/astral-sh/ty/issues/159

closes https://github.com/astral-sh/ty/issues/1081

## Conformance tests changes

```diff
+enums_member_values.py:85:9: error[invalid-assignment] Object of type `int` is not assignable to attribute `_value_` of type `str`
```
A true positive ✔️ 

```diff
-generics_self_advanced.py:35:9: error[type-assertion-failure] Argument does not have asserted type `Self@method2`
-generics_self_basic.py:14:9: error[type-assertion-failure] Argument does not have asserted type `Self@set_scale
```

Two false positives going away ✔️ 

```diff
+generics_syntax_infer_variance.py:82:9: error[invalid-assignment] Cannot assign to final attribute `x` on type `Self@__init__`
```

This looks like a true positive to me, even if it's not marked with `#
E` ✔️

```diff
+protocols_explicit.py:56:9: error[invalid-assignment] Object of type `tuple[int, int, str]` is not assignable to attribute `rgb` of type `tuple[int, int, int]`
```

True positive ✔️ 

```
+protocols_explicit.py:85:9: error[invalid-attribute-access] Cannot assign to ClassVar `cm1` from an instance of type `Self@__init__`
```

This looks like a true positive to me, even if it's not marked with `#
E`. But this is consistent with our understanding of `ClassVar`, I
think. ✔️

```py
+qualifiers_final_annotation.py:52:9: error[invalid-assignment] Cannot assign to final attribute `ID4` on type `Self@__init__`
+qualifiers_final_annotation.py:65:9: error[invalid-assignment] Cannot assign to final attribute `ID7` on type `Self@method1`
```

New true positives ✔️ 

```py
+qualifiers_final_annotation.py:52:9: error[invalid-assignment] Cannot assign to final attribute `ID4` on type `Self@__init__`
+qualifiers_final_annotation.py:57:13: error[invalid-assignment] Cannot assign to final attribute `ID6` on type `Self@__init__`
+qualifiers_final_annotation.py:59:13: error[invalid-assignment] Cannot assign to final attribute `ID6` on type `Self@__init__`
```

This is a new false positive, but that's a pre-existing issue on main
(if you annotate with `Self`):
https://play.ty.dev/3ee1c56d-7e13-43bb-811a-7a81e236e6ab  => reported
as https://github.com/astral-sh/ty/issues/1409

## Ecosystem

* There are 5931 new `unresolved-attribute` and 3292 new
`possibly-missing-attribute` attribute errors, way too many to look at
all of them. I randomly sampled 15 of these errors and found:
* 13 instances where there was simply no such attribute that we could
plausibly see. Sometimes [I didn't find it
anywhere](8644d886c6/openlibrary/plugins/openlibrary/tests/test_listapi.py (L33)).
Sometimes it was set externally on the object. Sometimes there was some
[`setattr` dynamicness going
on](a49f6b927d/setuptools/wheel.py (L88-L94)).
I would consider all of them to be true positives.
* 1 instance where [attribute was set on `obj` in
`__new__`](9e87b44fd4/sympy/tensor/array/array_comprehension.py (L45C1-L45C36)),
which we don't support yet
  * 1 instance [where the attribute was defined via `__slots__`

](e250ec0fc8/lib/spack/spack/vendor/pyrsistent/_pdeque.py (L48C5-L48C14))
* I see 44 instances [of the false positive
above](https://github.com/astral-sh/ty/issues/1409) with `Final`
instance attributes being set in `__init__`. I don't think this should
block this PR.

## Test Plan

New Markdown tests.

---------

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
2025-10-23 09:34:39 +02:00
Micha Reiser
76a55314e4 Fix rare multithreaded related hang (#21038) 2025-10-23 09:25:16 +02:00
Takayuki Maeda
6c18f18450 [ruff] Fix UP032 conversion for decimal ints with underscores (#21022)
<!--
Thank you for contributing to Ruff/ty! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title? (Please prefix
with `[ty]` for ty pull
  requests.)
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

Fixes #21017

Taught UP032’s parenthesize check to ignore underscores when inspecting
decimal integer literals so the converter emits `f"{(1_2).real}"`
instead of invalid syntax.

## Test Plan

Added test cases to UP032_2.py.

<!-- How was it tested? -->
2025-10-22 18:11:50 -04:00
William Woodruff
7ba176d395 ci: adjust zizmor config, bump dist (#20999)
## Summary

Also bumps `cargo dist` to 0.30, and moves us
back to the upstream copy of `dist` now that
the latest version has integrated our fork's
patches.

## Test Plan

See what happens in CI 🙂

---------

Signed-off-by: William Woodruff <william@astral.sh>
2025-10-22 17:48:17 -04:00
Douglas Creager
766ed5b5f3 [ty] Some more simplifications when rendering constraint sets (#21009)
This PR adds another useful simplification when rendering constraint
sets: `T = int` instead of `T = int ∧ T ≠ str`. (The "smaller"
constraint `T = int` implies the "larger" constraint `T ≠ str`.
Constraint set clauses are intersections, and if one constraint in a
clause implies another, we can throw away the "larger" constraint.)

While we're here, we also normalize the bounds of a constraint, so that
we equate e.g. `T ≤ int | str` with `T ≤ str | int`, and change the
ordering of BDD variables so that all constraints with the same typevar
are ordered adjacent to each other.

Lastly, we also add a new `display_graph` helper method that prints out
the full graph structure of a BDD.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-10-22 13:38:44 -04:00
David Peter
81c1d36088 [ty] Make attributes.md mdtests faster (#21030)
## Summary

That example was too extreme for debug mode.
2025-10-22 16:40:58 +02:00
Alex Waygood
20510e1d71 [ty] Set INSTA_FORCE_PASS and INSTA_OUTPUT environment variables from mdtest.py (#21029) 2025-10-22 15:32:14 +01:00
David Peter
58a68f1bbd [ty] Fall back to Divergent for deeply nested specializations (#20988)
## Summary

Fall back to `C[Divergent]` if we are trying to specialize `C[T]` with a
type that itself already contains deeply nested specialized generic
classes. This is a way to prevent infinite recursion for cases like
`self.x = [self.x]` where type inference for the implicit instance
attribute would not converge.

closes https://github.com/astral-sh/ty/issues/1383
closes https://github.com/astral-sh/ty/issues/837

## Test Plan

Regression tests.
2025-10-22 14:29:10 +02:00
Takayuki Maeda
2c9433796a [ruff] Autogenerate TypeParam nodes (#21028) 2025-10-22 14:06:24 +02:00
Alex Waygood
40148d7b11 [ty] Add assertions to ensure that we never call KnownClass::Tuple.to_instance() or similar (#21027) 2025-10-22 11:07:01 +00:00
Takayuki Maeda
6271fba1e1 [ruff] Auto generate ast Pattern nodes (#21024) 2025-10-22 08:24:34 +02:00
Takayuki Maeda
a51a0f16e4 [flake8-simplify] Skip SIM911 when unknown arguments are present (#20697)
<!--
Thank you for contributing to Ruff/ty! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title? (Please prefix
with `[ty]` for ty pull
  requests.)
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

Fixes #18778

Prevent SIM911 from triggering when zip() is called on .keys()/.values()
that take any positional or keyword arguments, so Ruff
never suggests the lossy rewrite.

## Test Plan

<!-- How was it tested? -->

Added a test case to SIM911.py.
2025-10-21 16:58:48 -04:00
Brent Westbrook
4b0fa5f270 Render a diagnostic for syntax errors introduced in formatter tests (#21021)
## Summary

I spun this out from #21005 because I thought it might be helpful
separately. It just renders a nice `Diagnostic` for syntax errors
pointing to the source of the error. This seemed a bit more helpful to
me than just the byte offset when working on #21005, and we had most of
the code around after #20443 anyway.

## Test Plan

This doesn't actually affect any passing tests, but here's an example of
the additional output I got when I broke the spacing after the `in`
token:

```
    error[internal-error]: Expected 'in', found name
      --> /home/brent/astral/ruff/crates/ruff_python_formatter/resources/test/fixtures/black/cases/cantfit.py:50:79
       |
    48 |     need_more_to_make_the_line_long_enough,
    49 | )
    50 | del ([], name_1, name_2), [(), [], name_4, name_3], name_1[[name_2 for name_1 inname_0]]
       |                                                                               ^^^^^^^^
    51 | del ()
       |
```

I just appended this to the other existing output for now.
2025-10-21 13:47:26 -04:00
Aria Desires
2e13b13012 [ty] Support goto-definition on vendored typeshed stubs (#21020)
This is an alternative to #21012 that more narrowly handles this logic
in the stub-mapping machinery rather than pervasively allowing us to
identify cached files as typeshed stubs. Much of the logic is the same
(pulling the logic out of ty_server so it can be reused).

I don't have a good sense for if one approach is "better" or "worse" in
terms of like, semantics and Weird Bugs that this can cause. This one is
just "less spooky in its broad consequences" and "less muddying of
separation of concerns" and puts the extra logic on a much colder path.
I won't be surprised if one day the previous implementation needs to be
revisited for its more sweeping effects but for now this is good.

Fixes https://github.com/astral-sh/ty/issues/1054
2025-10-21 13:38:40 -04:00
Micha Reiser
9d1ffd605c [ty] Implement go-to for binary and unary operators (#21001)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-10-21 19:25:41 +02:00
David Peter
2dbca6370b [ty] Avoid ever-growing default types (#20991)
## Summary

We currently panic in the seemingly rare case where the type of a
default value of a parameter depends on the callable itself:
```py
class C:
    def f(self: C):
        self.x = lambda a=self.x: a
```

Types of default values are only used for display reasons, and it's
unclear if we even want to track them (or if we should rather track the
actual value). So it didn't seem to me that we should spend a lot of
effort (and runtime) trying to achieve a theoretically correct type here
(which would be infinite).

Instead, we simply replace *nested* default types with `Unknown`, i.e.
only if the type of the default value is a callable itself.

closes https://github.com/astral-sh/ty/issues/1402

## Test Plan

Regression tests
2025-10-21 19:13:36 +02:00
Bhuminjay Soni
3dd78e711e [syntax-errors] Name is parameter and global (#20426)
## Summary

<!-- What's the purpose of the change? What does it do, and why? -->
This PR implements a new semantic syntax error where name is parameter &
global.

## Test Plan

<!-- How was it tested? -->
I have written inline test as directed in #17412

---------

Signed-off-by: 11happy <soni5happy@gmail.com>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
2025-10-21 16:51:16 +00:00
171 changed files with 3524 additions and 2188 deletions

View File

@@ -18,6 +18,8 @@ env:
CARGO_TERM_COLOR: always
RUSTUP_MAX_RETRIES: 10
permissions: {}
jobs:
publish:
runs-on: ubuntu-latest
@@ -32,7 +34,7 @@ jobs:
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
cache: "npm"
cache: "npm" # zizmor: ignore[cache-poisoning] acceptable risk for CloudFlare pages artifact
cache-dependency-path: playground/package-lock.json
- uses: jetli/wasm-bindgen-action@20b33e20595891ab1a0ed73145d8a21fc96e7c29 # v0.2.0
- name: "Install Node dependencies"

View File

@@ -38,6 +38,7 @@ jobs:
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
cache: "npm" # zizmor: ignore[cache-poisoning] acceptable risk for CloudFlare pages artifact
- uses: jetli/wasm-bindgen-action@20b33e20595891ab1a0ed73145d8a21fc96e7c29 # v0.2.0
- name: "Install Node dependencies"
run: npm ci

View File

@@ -1,7 +1,6 @@
# This file was autogenerated by dist: https://github.com/astral-sh/cargo-dist
# This file was autogenerated by dist: https://axodotdev.github.io/cargo-dist
#
# Copyright 2022-2024, axodotdev
# Copyright 2025 Astral Software Inc.
# SPDX-License-Identifier: MIT or Apache-2.0
#
# CI that:
@@ -69,7 +68,7 @@ jobs:
# we specify bash to get pipefail; it guards against the `curl` command
# failing. otherwise `sh` won't catch that `curl` returned non-0
shell: bash
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.5-prerelease.1/cargo-dist-installer.sh | sh"
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.0/cargo-dist-installer.sh | sh"
- name: Cache dist
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
with:

View File

@@ -34,10 +34,13 @@ jobs:
- name: Install the latest version of uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true # zizmor: ignore[cache-poisoning] acceptable risk for CloudFlare pages artifact
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
with:
workspaces: "ruff"
lookup-only: false # zizmor: ignore[cache-poisoning] acceptable risk for CloudFlare pages artifact
- name: Install Rust toolchain
run: rustup show

View File

@@ -30,10 +30,13 @@ jobs:
- name: Install the latest version of uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true # zizmor: ignore[cache-poisoning] acceptable risk for CloudFlare pages artifact
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
with:
workspaces: "ruff"
lookup-only: false # zizmor: ignore[cache-poisoning] acceptable risk for CloudFlare pages artifact
- name: Install Rust toolchain
run: rustup show

13
.github/zizmor.yml vendored
View File

@@ -9,13 +9,18 @@ rules:
cache-poisoning:
ignore:
- build-docker.yml
- publish-playground.yml
- ty-ecosystem-analyzer.yaml
- ty-ecosystem-report.yaml
excessive-permissions:
# it's hard to test what the impact of removing these ignores would be
# without actually running the release workflow...
ignore:
- build-docker.yml
- publish-playground.yml
- publish-docs.yml
secrets-inherit:
# `cargo dist` makes extensive use of `secrets: inherit`,
# and we can't easily fix that until an upstream release changes that.
disable: true
template-injection:
ignore:
# like with `secrets-inherit`, `cargo dist` introduces some
# template injections. We've manually audited these usages for safety.
- release.yml

View File

@@ -101,8 +101,8 @@ repos:
# zizmor detects security vulnerabilities in GitHub Actions workflows.
# Additional configuration for the tool is found in `.github/zizmor.yml`
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.11.0
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.15.2
hooks:
- id: zizmor

10
Cargo.lock generated
View File

@@ -3563,7 +3563,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "salsa"
version = "0.24.0"
source = "git+https://github.com/salsa-rs/salsa.git?rev=ef9f9329be6923acd050c8dddd172e3bc93e8051#ef9f9329be6923acd050c8dddd172e3bc93e8051"
source = "git+https://github.com/salsa-rs/salsa.git?rev=d38145c29574758de7ffbe8a13cd4584c3b09161#d38145c29574758de7ffbe8a13cd4584c3b09161"
dependencies = [
"boxcar",
"compact_str",
@@ -3587,12 +3587,12 @@ dependencies = [
[[package]]
name = "salsa-macro-rules"
version = "0.24.0"
source = "git+https://github.com/salsa-rs/salsa.git?rev=ef9f9329be6923acd050c8dddd172e3bc93e8051#ef9f9329be6923acd050c8dddd172e3bc93e8051"
source = "git+https://github.com/salsa-rs/salsa.git?rev=d38145c29574758de7ffbe8a13cd4584c3b09161#d38145c29574758de7ffbe8a13cd4584c3b09161"
[[package]]
name = "salsa-macros"
version = "0.24.0"
source = "git+https://github.com/salsa-rs/salsa.git?rev=ef9f9329be6923acd050c8dddd172e3bc93e8051#ef9f9329be6923acd050c8dddd172e3bc93e8051"
source = "git+https://github.com/salsa-rs/salsa.git?rev=d38145c29574758de7ffbe8a13cd4584c3b09161#d38145c29574758de7ffbe8a13cd4584c3b09161"
dependencies = [
"proc-macro2",
"quote",
@@ -4376,6 +4376,7 @@ dependencies = [
"tracing",
"ty_project",
"ty_python_semantic",
"ty_vendored",
]
[[package]]
@@ -4433,10 +4434,12 @@ dependencies = [
"glob",
"hashbrown 0.16.0",
"indexmap",
"indoc",
"insta",
"itertools 0.14.0",
"memchr",
"ordermap",
"pretty_assertions",
"quickcheck",
"quickcheck_macros",
"ruff_annotate_snippets",
@@ -4504,7 +4507,6 @@ dependencies = [
"ty_ide",
"ty_project",
"ty_python_semantic",
"ty_vendored",
]
[[package]]

View File

@@ -146,7 +146,7 @@ regex-automata = { version = "0.4.9" }
rustc-hash = { version = "2.0.0" }
rustc-stable-hash = { version = "0.1.2" }
# When updating salsa, make sure to also update the revision in `fuzz/Cargo.toml`
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "ef9f9329be6923acd050c8dddd172e3bc93e8051", default-features = false, features = [
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "d38145c29574758de7ffbe8a13cd4584c3b09161", default-features = false, features = [
"compact_str",
"macros",
"salsa_unstable",

View File

@@ -879,19 +879,7 @@ impl From<&FormatCommandError> for Diagnostic {
| FormatCommandError::Write(_, source_error) => {
Diagnostic::new(DiagnosticId::Io, Severity::Error, source_error)
}
FormatCommandError::Format(_, format_module_error) => match format_module_error {
FormatModuleError::ParseError(parse_error) => Diagnostic::new(
DiagnosticId::InternalError,
Severity::Error,
&parse_error.error,
),
FormatModuleError::FormatError(format_error) => {
Diagnostic::new(DiagnosticId::InternalError, Severity::Error, format_error)
}
FormatModuleError::PrintError(print_error) => {
Diagnostic::new(DiagnosticId::InternalError, Severity::Error, print_error)
}
},
FormatCommandError::Format(_, format_module_error) => format_module_error.into(),
FormatCommandError::RangeFormatNotebook(_) => Diagnostic::new(
DiagnosticId::InvalidCliOption,
Severity::Error,

View File

@@ -667,7 +667,7 @@ fn attrs(criterion: &mut Criterion) {
max_dep_date: "2025-06-17",
python_version: PythonVersion::PY313,
},
100,
110,
);
bench_project(&benchmark, criterion);
@@ -684,7 +684,7 @@ fn anyio(criterion: &mut Criterion) {
max_dep_date: "2025-06-17",
python_version: PythonVersion::PY313,
},
100,
150,
);
bench_project(&benchmark, criterion);

View File

@@ -210,7 +210,7 @@ static TANJUN: Benchmark = Benchmark::new(
max_dep_date: "2025-06-17",
python_version: PythonVersion::PY312,
},
100,
320,
);
static STATIC_FRAME: Benchmark = Benchmark::new(
@@ -226,7 +226,7 @@ static STATIC_FRAME: Benchmark = Benchmark::new(
max_dep_date: "2025-08-09",
python_version: PythonVersion::PY311,
},
630,
750,
);
#[track_caller]

View File

@@ -34,3 +34,7 @@ def foo():
# https://github.com/astral-sh/ruff/issues/18776
flag_stars = {}
for country, stars in(zip)(flag_stars.keys(), flag_stars.values()):...
# Regression test for https://github.com/astral-sh/ruff/issues/18778
d = {}
for country, stars in zip(d.keys(*x), d.values("hello")):...

View File

@@ -26,3 +26,8 @@
"{.real}".format({1, 2})
"{.real}".format({1: 2, 3: 4})
"{}".format((i for i in range(2)))
# https://github.com/astral-sh/ruff/issues/21017
"{.real}".format(1_2)
"{0.real}".format(1_2)
"{a.real}".format(a=1_2)

View File

@@ -725,6 +725,7 @@ impl SemanticSyntaxContext for Checker<'_> {
| SemanticSyntaxErrorKind::WriteToDebug(_)
| SemanticSyntaxErrorKind::DifferentMatchPatternBindings
| SemanticSyntaxErrorKind::InvalidExpression(..)
| SemanticSyntaxErrorKind::GlobalParameter(_)
| SemanticSyntaxErrorKind::DuplicateMatchKey(_)
| SemanticSyntaxErrorKind::DuplicateMatchClassAttribute(_)
| SemanticSyntaxErrorKind::InvalidStarExpression
@@ -846,6 +847,26 @@ impl SemanticSyntaxContext for Checker<'_> {
}
false
}
fn is_bound_parameter(&self, name: &str) -> bool {
for scope in self.semantic.current_scopes() {
match scope.kind {
ScopeKind::Class(_) => return false,
ScopeKind::Function(ast::StmtFunctionDef { parameters, .. })
| ScopeKind::Lambda(ast::ExprLambda {
parameters: Some(parameters),
..
}) => return parameters.includes(name),
ScopeKind::Lambda(_)
| ScopeKind::Generator { .. }
| ScopeKind::Module
| ScopeKind::Type
| ScopeKind::DunderClassCell => {}
}
}
false
}
}
impl<'a> Visitor<'a> for Checker<'a> {

View File

@@ -1040,6 +1040,42 @@ mod tests {
PythonVersion::PY310,
"DuplicateMatchKey"
)]
#[test_case(
"global_parameter",
"
def f(a):
global a
def g(a):
if True:
global a
def h(a):
def inner():
global a
def i(a):
try:
global a
except Exception:
pass
def f(a):
a = 1
global a
def f(a):
a = 1
a = 2
global a
def f(a):
class Inner:
global a # ok
",
PythonVersion::PY310,
"GlobalParameter"
)]
#[test_case(
"duplicate_match_class_attribute",
"

View File

@@ -78,13 +78,18 @@ pub(crate) fn zip_dict_keys_and_values(checker: &Checker, expr: &ast::ExprCall)
let [arg1, arg2] = &args[..] else {
return;
};
let Some((var1, attr1)) = get_var_attr(arg1) else {
let Some((var1, attr1, args1)) = get_var_attr_args(arg1) else {
return;
};
let Some((var2, attr2)) = get_var_attr(arg2) else {
let Some((var2, attr2, args2)) = get_var_attr_args(arg2) else {
return;
};
if var1.id != var2.id || attr1 != "keys" || attr2 != "values" {
if var1.id != var2.id
|| attr1 != "keys"
|| attr2 != "values"
|| !args1.is_empty()
|| !args2.is_empty()
{
return;
}
if !checker.semantic().match_builtin_expr(func, "zip") {
@@ -122,8 +127,11 @@ pub(crate) fn zip_dict_keys_and_values(checker: &Checker, expr: &ast::ExprCall)
)));
}
fn get_var_attr(expr: &Expr) -> Option<(&ExprName, &Identifier)> {
let Expr::Call(ast::ExprCall { func, .. }) = expr else {
fn get_var_attr_args(expr: &Expr) -> Option<(&ExprName, &Identifier, &Arguments)> {
let Expr::Call(ast::ExprCall {
func, arguments, ..
}) = expr
else {
return None;
};
let Expr::Attribute(ExprAttribute { value, attr, .. }) = func.as_ref() else {
@@ -132,5 +140,5 @@ fn get_var_attr(expr: &Expr) -> Option<(&ExprName, &Identifier)> {
let Expr::Name(var_name) = value.as_ref() else {
return None;
};
Some((var_name, attr))
Some((var_name, attr, arguments))
}

View File

@@ -81,6 +81,8 @@ SIM911 [*] Use ` flag_stars.items()` instead of `(zip)(flag_stars.keys(), flag_s
35 | flag_stars = {}
36 | for country, stars in(zip)(flag_stars.keys(), flag_stars.values()):...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37 |
38 | # Regression test for https://github.com/astral-sh/ruff/issues/18778
|
help: Replace `(zip)(flag_stars.keys(), flag_stars.values())` with ` flag_stars.items()`
33 |
@@ -88,3 +90,6 @@ help: Replace `(zip)(flag_stars.keys(), flag_stars.values())` with ` flag_stars.
35 | flag_stars = {}
- for country, stars in(zip)(flag_stars.keys(), flag_stars.values()):...
36 + for country, stars in flag_stars.items():...
37 |
38 | # Regression test for https://github.com/astral-sh/ruff/issues/18778
39 | d = {}

View File

@@ -160,7 +160,11 @@ fn parenthesize(expr: &Expr, text: &str, context: FormatContext) -> bool {
value: ast::Number::Int(..),
..
}),
) => text.chars().all(|c| c.is_ascii_digit()),
) => text
.chars()
// Ignore digit separators so decimal literals like `1_2` still count as pure digits.
.filter(|c| *c != '_')
.all(|c| c.is_ascii_digit()),
// E.g., `{x, y}` should be parenthesized in `f"{(x, y)}"`.
(
_,

View File

@@ -385,6 +385,7 @@ help: Convert to f-string
26 + f"{({1, 2}).real}"
27 | "{.real}".format({1: 2, 3: 4})
28 | "{}".format((i for i in range(2)))
29 |
UP032 [*] Use f-string instead of `format` call
--> UP032_2.py:27:1
@@ -402,6 +403,8 @@ help: Convert to f-string
- "{.real}".format({1: 2, 3: 4})
27 + f"{({1: 2, 3: 4}).real}"
28 | "{}".format((i for i in range(2)))
29 |
30 | # https://github.com/astral-sh/ruff/issues/21017
UP032 [*] Use f-string instead of `format` call
--> UP032_2.py:28:1
@@ -410,6 +413,8 @@ UP032 [*] Use f-string instead of `format` call
27 | "{.real}".format({1: 2, 3: 4})
28 | "{}".format((i for i in range(2)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29 |
30 | # https://github.com/astral-sh/ruff/issues/21017
|
help: Convert to f-string
25 | "{.real}".format([1, 2])
@@ -417,3 +422,56 @@ help: Convert to f-string
27 | "{.real}".format({1: 2, 3: 4})
- "{}".format((i for i in range(2)))
28 + f"{(i for i in range(2))}"
29 |
30 | # https://github.com/astral-sh/ruff/issues/21017
31 | "{.real}".format(1_2)
UP032 [*] Use f-string instead of `format` call
--> UP032_2.py:31:1
|
30 | # https://github.com/astral-sh/ruff/issues/21017
31 | "{.real}".format(1_2)
| ^^^^^^^^^^^^^^^^^^^^^
32 | "{0.real}".format(1_2)
33 | "{a.real}".format(a=1_2)
|
help: Convert to f-string
28 | "{}".format((i for i in range(2)))
29 |
30 | # https://github.com/astral-sh/ruff/issues/21017
- "{.real}".format(1_2)
31 + f"{(1_2).real}"
32 | "{0.real}".format(1_2)
33 | "{a.real}".format(a=1_2)
UP032 [*] Use f-string instead of `format` call
--> UP032_2.py:32:1
|
30 | # https://github.com/astral-sh/ruff/issues/21017
31 | "{.real}".format(1_2)
32 | "{0.real}".format(1_2)
| ^^^^^^^^^^^^^^^^^^^^^^
33 | "{a.real}".format(a=1_2)
|
help: Convert to f-string
29 |
30 | # https://github.com/astral-sh/ruff/issues/21017
31 | "{.real}".format(1_2)
- "{0.real}".format(1_2)
32 + f"{(1_2).real}"
33 | "{a.real}".format(a=1_2)
UP032 [*] Use f-string instead of `format` call
--> UP032_2.py:33:1
|
31 | "{.real}".format(1_2)
32 | "{0.real}".format(1_2)
33 | "{a.real}".format(a=1_2)
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
help: Convert to f-string
30 | # https://github.com/astral-sh/ruff/issues/21017
31 | "{.real}".format(1_2)
32 | "{0.real}".format(1_2)
- "{a.real}".format(a=1_2)
33 + f"{(1_2).real}"

View File

@@ -0,0 +1,56 @@
---
source: crates/ruff_linter/src/linter.rs
---
invalid-syntax: name `a` is parameter and global
--> <filename>:3:12
|
2 | def f(a):
3 | global a
| ^
4 |
5 | def g(a):
|
invalid-syntax: name `a` is parameter and global
--> <filename>:7:16
|
5 | def g(a):
6 | if True:
7 | global a
| ^
8 |
9 | def h(a):
|
invalid-syntax: name `a` is parameter and global
--> <filename>:15:16
|
13 | def i(a):
14 | try:
15 | global a
| ^
16 | except Exception:
17 | pass
|
invalid-syntax: name `a` is parameter and global
--> <filename>:21:12
|
19 | def f(a):
20 | a = 1
21 | global a
| ^
22 |
23 | def f(a):
|
invalid-syntax: name `a` is parameter and global
--> <filename>:26:12
|
24 | a = 1
25 | a = 2
26 | global a
| ^
27 |
28 | def f(a):
|

View File

@@ -559,23 +559,73 @@ InterpolatedStringLiteralElement = { variant = "Literal" }
[Pattern]
doc = "See also [pattern](https://docs.python.org/3/library/ast.html#ast.pattern)"
[Pattern.nodes]
PatternMatchValue = {}
PatternMatchSingleton = {}
PatternMatchSequence = {}
PatternMatchMapping = {}
PatternMatchClass = {}
PatternMatchStar = {}
PatternMatchAs = {}
PatternMatchOr = {}
[Pattern.nodes.PatternMatchValue]
doc = "See also [MatchValue](https://docs.python.org/3/library/ast.html#ast.MatchValue)"
fields = [{ name = "value", type = "Box<Expr>" }]
[Pattern.nodes.PatternMatchSingleton]
doc = "See also [MatchSingleton](https://docs.python.org/3/library/ast.html#ast.MatchSingleton)"
fields = [{ name = "value", type = "Singleton" }]
[Pattern.nodes.PatternMatchSequence]
doc = "See also [MatchSequence](https://docs.python.org/3/library/ast.html#ast.MatchSequence)"
fields = [{ name = "patterns", type = "Pattern*" }]
[Pattern.nodes.PatternMatchMapping]
doc = "See also [MatchMapping](https://docs.python.org/3/library/ast.html#ast.MatchMapping)"
fields = [
{ name = "keys", type = "Expr*" },
{ name = "patterns", type = "Pattern*" },
{ name = "rest", type = "Identifier?" },
]
custom_source_order = true
[Pattern.nodes.PatternMatchClass]
doc = "See also [MatchClass](https://docs.python.org/3/library/ast.html#ast.MatchClass)"
fields = [
{ name = "cls", type = "Box<Expr>" },
{ name = "arguments", type = "PatternArguments" },
]
[Pattern.nodes.PatternMatchStar]
doc = "See also [MatchStar](https://docs.python.org/3/library/ast.html#ast.MatchStar)"
fields = [{ name = "name", type = "Identifier?" }]
[Pattern.nodes.PatternMatchAs]
doc = "See also [MatchAs](https://docs.python.org/3/library/ast.html#ast.MatchAs)"
fields = [
{ name = "pattern", type = "Box<Pattern>?" },
{ name = "name", type = "Identifier?" },
]
[Pattern.nodes.PatternMatchOr]
doc = "See also [MatchOr](https://docs.python.org/3/library/ast.html#ast.MatchOr)"
fields = [{ name = "patterns", type = "Pattern*" }]
[TypeParam]
doc = "See also [type_param](https://docs.python.org/3/library/ast.html#ast.type_param)"
[TypeParam.nodes]
TypeParamTypeVar = {}
TypeParamTypeVarTuple = {}
TypeParamParamSpec = {}
[TypeParam.nodes.TypeParamTypeVar]
doc = "See also [TypeVar](https://docs.python.org/3/library/ast.html#ast.TypeVar)"
fields = [
{ name = "name", type = "Identifier" },
{ name = "bound", type = "Box<Expr>?" },
{ name = "default", type = "Box<Expr>?" },
]
[TypeParam.nodes.TypeParamTypeVarTuple]
doc = "See also [TypeVarTuple](https://docs.python.org/3/library/ast.html#ast.TypeVarTuple)"
fields = [
{ name = "name", type = "Identifier" },
{ name = "default", type = "Box<Expr>?" },
]
[TypeParam.nodes.TypeParamParamSpec]
doc = "See also [ParamSpec](https://docs.python.org/3/library/ast.html#ast.ParamSpec)"
fields = [
{ name = "name", type = "Identifier" },
{ name = "default", type = "Box<Expr>?" },
]
[ungrouped.nodes]
InterpolatedStringFormatSpec = {}

View File

@@ -38,6 +38,8 @@ types_requiring_crate_prefix = {
"WithItem",
"MatchCase",
"Alias",
"Singleton",
"PatternArguments",
}

View File

@@ -9637,6 +9637,113 @@ pub struct ExprIpyEscapeCommand {
pub value: Box<str>,
}
/// See also [MatchValue](https://docs.python.org/3/library/ast.html#ast.MatchValue)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchValue {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub value: Box<Expr>,
}
/// See also [MatchSingleton](https://docs.python.org/3/library/ast.html#ast.MatchSingleton)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchSingleton {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub value: crate::Singleton,
}
/// See also [MatchSequence](https://docs.python.org/3/library/ast.html#ast.MatchSequence)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchSequence {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub patterns: Vec<Pattern>,
}
/// See also [MatchMapping](https://docs.python.org/3/library/ast.html#ast.MatchMapping)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchMapping {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub keys: Vec<Expr>,
pub patterns: Vec<Pattern>,
pub rest: Option<crate::Identifier>,
}
/// See also [MatchClass](https://docs.python.org/3/library/ast.html#ast.MatchClass)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchClass {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub cls: Box<Expr>,
pub arguments: crate::PatternArguments,
}
/// See also [MatchStar](https://docs.python.org/3/library/ast.html#ast.MatchStar)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchStar {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub name: Option<crate::Identifier>,
}
/// See also [MatchAs](https://docs.python.org/3/library/ast.html#ast.MatchAs)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchAs {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub pattern: Option<Box<Pattern>>,
pub name: Option<crate::Identifier>,
}
/// See also [MatchOr](https://docs.python.org/3/library/ast.html#ast.MatchOr)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchOr {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub patterns: Vec<Pattern>,
}
/// See also [TypeVar](https://docs.python.org/3/library/ast.html#ast.TypeVar)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct TypeParamTypeVar {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub name: crate::Identifier,
pub bound: Option<Box<Expr>>,
pub default: Option<Box<Expr>>,
}
/// See also [TypeVarTuple](https://docs.python.org/3/library/ast.html#ast.TypeVarTuple)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct TypeParamTypeVarTuple {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub name: crate::Identifier,
pub default: Option<Box<Expr>>,
}
/// See also [ParamSpec](https://docs.python.org/3/library/ast.html#ast.ParamSpec)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct TypeParamParamSpec {
pub node_index: crate::AtomicNodeIndex,
pub range: ruff_text_size::TextRange,
pub name: crate::Identifier,
pub default: Option<Box<Expr>>,
}
impl ModModule {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
@@ -10585,3 +10692,182 @@ impl ExprIpyEscapeCommand {
} = self;
}
}
impl PatternMatchValue {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let PatternMatchValue {
value,
range: _,
node_index: _,
} = self;
visitor.visit_expr(value);
}
}
impl PatternMatchSingleton {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let PatternMatchSingleton {
value,
range: _,
node_index: _,
} = self;
visitor.visit_singleton(value);
}
}
impl PatternMatchSequence {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let PatternMatchSequence {
patterns,
range: _,
node_index: _,
} = self;
for elm in patterns {
visitor.visit_pattern(elm);
}
}
}
impl PatternMatchClass {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let PatternMatchClass {
cls,
arguments,
range: _,
node_index: _,
} = self;
visitor.visit_expr(cls);
visitor.visit_pattern_arguments(arguments);
}
}
impl PatternMatchStar {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let PatternMatchStar {
name,
range: _,
node_index: _,
} = self;
if let Some(name) = name {
visitor.visit_identifier(name);
}
}
}
impl PatternMatchAs {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let PatternMatchAs {
pattern,
name,
range: _,
node_index: _,
} = self;
if let Some(pattern) = pattern {
visitor.visit_pattern(pattern);
}
if let Some(name) = name {
visitor.visit_identifier(name);
}
}
}
impl PatternMatchOr {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let PatternMatchOr {
patterns,
range: _,
node_index: _,
} = self;
for elm in patterns {
visitor.visit_pattern(elm);
}
}
}
impl TypeParamTypeVar {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let TypeParamTypeVar {
name,
bound,
default,
range: _,
node_index: _,
} = self;
visitor.visit_identifier(name);
if let Some(bound) = bound {
visitor.visit_expr(bound);
}
if let Some(default) = default {
visitor.visit_expr(default);
}
}
}
impl TypeParamTypeVarTuple {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let TypeParamTypeVarTuple {
name,
default,
range: _,
node_index: _,
} = self;
visitor.visit_identifier(name);
if let Some(default) = default {
visitor.visit_expr(default);
}
}
}
impl TypeParamParamSpec {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let TypeParamParamSpec {
name,
default,
range: _,
node_index: _,
} = self;
visitor.visit_identifier(name);
if let Some(default) = default {
visitor.visit_expr(default);
}
}
}

View File

@@ -235,50 +235,6 @@ impl ast::ExceptHandlerExceptHandler {
}
}
impl ast::PatternMatchValue {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::PatternMatchValue {
value,
range: _,
node_index: _,
} = self;
visitor.visit_expr(value);
}
}
impl ast::PatternMatchSingleton {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::PatternMatchSingleton {
value,
range: _,
node_index: _,
} = self;
visitor.visit_singleton(value);
}
}
impl ast::PatternMatchSequence {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::PatternMatchSequence {
patterns,
range: _,
node_index: _,
} = self;
for pattern in patterns {
visitor.visit_pattern(pattern);
}
}
}
impl ast::PatternMatchMapping {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
@@ -311,76 +267,6 @@ impl ast::PatternMatchMapping {
}
}
impl ast::PatternMatchClass {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::PatternMatchClass {
cls,
arguments: parameters,
range: _,
node_index: _,
} = self;
visitor.visit_expr(cls);
visitor.visit_pattern_arguments(parameters);
}
}
impl ast::PatternMatchStar {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::PatternMatchStar {
range: _,
node_index: _,
name,
} = self;
if let Some(name) = name {
visitor.visit_identifier(name);
}
}
}
impl ast::PatternMatchAs {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::PatternMatchAs {
pattern,
range: _,
node_index: _,
name,
} = self;
if let Some(pattern) = pattern {
visitor.visit_pattern(pattern);
}
if let Some(name) = name {
visitor.visit_identifier(name);
}
}
}
impl ast::PatternMatchOr {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::PatternMatchOr {
patterns,
range: _,
node_index: _,
} = self;
for pattern in patterns {
visitor.visit_pattern(pattern);
}
}
}
impl ast::PatternArguments {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
@@ -620,67 +506,6 @@ impl ast::TypeParams {
}
}
impl ast::TypeParamTypeVar {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::TypeParamTypeVar {
bound,
default,
name,
range: _,
node_index: _,
} = self;
visitor.visit_identifier(name);
if let Some(expr) = bound {
visitor.visit_expr(expr);
}
if let Some(expr) = default {
visitor.visit_expr(expr);
}
}
}
impl ast::TypeParamTypeVarTuple {
#[inline]
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::TypeParamTypeVarTuple {
range: _,
node_index: _,
name,
default,
} = self;
visitor.visit_identifier(name);
if let Some(expr) = default {
visitor.visit_expr(expr);
}
}
}
impl ast::TypeParamParamSpec {
#[inline]
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where
V: SourceOrderVisitor<'a> + ?Sized,
{
let ast::TypeParamParamSpec {
range: _,
node_index: _,
name,
default,
} = self;
visitor.visit_identifier(name);
if let Some(expr) = default {
visitor.visit_expr(expr);
}
}
}
impl ast::FString {
pub(crate) fn visit_source_order<'a, V>(&'a self, visitor: &mut V)
where

View File

@@ -3,7 +3,7 @@
use crate::AtomicNodeIndex;
use crate::generated::{
ExprBytesLiteral, ExprDict, ExprFString, ExprList, ExprName, ExprSet, ExprStringLiteral,
ExprTString, ExprTuple, StmtClassDef,
ExprTString, ExprTuple, PatternMatchAs, PatternMatchOr, StmtClassDef,
};
use std::borrow::Cow;
use std::fmt;
@@ -2848,58 +2848,10 @@ pub enum IrrefutablePatternKind {
Wildcard,
}
/// See also [MatchValue](https://docs.python.org/3/library/ast.html#ast.MatchValue)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchValue {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub value: Box<Expr>,
}
/// See also [MatchSingleton](https://docs.python.org/3/library/ast.html#ast.MatchSingleton)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchSingleton {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub value: Singleton,
}
/// See also [MatchSequence](https://docs.python.org/3/library/ast.html#ast.MatchSequence)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchSequence {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub patterns: Vec<Pattern>,
}
/// See also [MatchMapping](https://docs.python.org/3/library/ast.html#ast.MatchMapping)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchMapping {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub keys: Vec<Expr>,
pub patterns: Vec<Pattern>,
pub rest: Option<Identifier>,
}
/// See also [MatchClass](https://docs.python.org/3/library/ast.html#ast.MatchClass)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchClass {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub cls: Box<Expr>,
pub arguments: PatternArguments,
}
/// An AST node to represent the arguments to a [`PatternMatchClass`], i.e., the
/// An AST node to represent the arguments to a [`crate::PatternMatchClass`], i.e., the
/// parenthesized contents in `case Point(1, x=0, y=0)`.
///
/// Like [`Arguments`], but for [`PatternMatchClass`].
/// Like [`Arguments`], but for [`crate::PatternMatchClass`].
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternArguments {
@@ -2909,10 +2861,10 @@ pub struct PatternArguments {
pub keywords: Vec<PatternKeyword>,
}
/// An AST node to represent the keyword arguments to a [`PatternMatchClass`], i.e., the
/// An AST node to represent the keyword arguments to a [`crate::PatternMatchClass`], i.e., the
/// `x=0` and `y=0` in `case Point(x=0, y=0)`.
///
/// Like [`Keyword`], but for [`PatternMatchClass`].
/// Like [`Keyword`], but for [`crate::PatternMatchClass`].
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternKeyword {
@@ -2922,34 +2874,6 @@ pub struct PatternKeyword {
pub pattern: Pattern,
}
/// See also [MatchStar](https://docs.python.org/3/library/ast.html#ast.MatchStar)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchStar {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub name: Option<Identifier>,
}
/// See also [MatchAs](https://docs.python.org/3/library/ast.html#ast.MatchAs)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchAs {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub pattern: Option<Box<Pattern>>,
pub name: Option<Identifier>,
}
/// See also [MatchOr](https://docs.python.org/3/library/ast.html#ast.MatchOr)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct PatternMatchOr {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub patterns: Vec<Pattern>,
}
impl TypeParam {
pub const fn name(&self) -> &Identifier {
match self {
@@ -2968,37 +2892,6 @@ impl TypeParam {
}
}
/// See also [TypeVar](https://docs.python.org/3/library/ast.html#ast.TypeVar)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct TypeParamTypeVar {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub name: Identifier,
pub bound: Option<Box<Expr>>,
pub default: Option<Box<Expr>>,
}
/// See also [ParamSpec](https://docs.python.org/3/library/ast.html#ast.ParamSpec)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct TypeParamParamSpec {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub name: Identifier,
pub default: Option<Box<Expr>>,
}
/// See also [TypeVarTuple](https://docs.python.org/3/library/ast.html#ast.TypeVarTuple)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
pub struct TypeParamTypeVarTuple {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub name: Identifier,
pub default: Option<Box<Expr>>,
}
/// See also [decorator](https://docs.python.org/3/library/ast.html#ast.decorator)
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]

View File

@@ -1,3 +1,4 @@
use ruff_db::diagnostic::{Diagnostic, DiagnosticId, Severity};
use ruff_db::files::File;
use ruff_db::parsed::parsed_module;
use ruff_db::source::source_text;
@@ -10,7 +11,7 @@ use ruff_formatter::{FormatError, Formatted, PrintError, Printed, SourceCode, fo
use ruff_python_ast::{AnyNodeRef, Mod};
use ruff_python_parser::{ParseError, ParseOptions, Parsed, parse};
use ruff_python_trivia::CommentRanges;
use ruff_text_size::Ranged;
use ruff_text_size::{Ranged, TextRange};
use crate::comments::{
Comments, SourceComment, has_skip_comment, leading_comments, trailing_comments,
@@ -117,6 +118,33 @@ pub enum FormatModuleError {
PrintError(#[from] PrintError),
}
impl FormatModuleError {
pub fn range(&self) -> Option<TextRange> {
match self {
FormatModuleError::ParseError(parse_error) => Some(parse_error.range()),
FormatModuleError::FormatError(_) | FormatModuleError::PrintError(_) => None,
}
}
}
impl From<&FormatModuleError> for Diagnostic {
fn from(error: &FormatModuleError) -> Self {
match error {
FormatModuleError::ParseError(parse_error) => Diagnostic::new(
DiagnosticId::InternalError,
Severity::Error,
&parse_error.error,
),
FormatModuleError::FormatError(format_error) => {
Diagnostic::new(DiagnosticId::InternalError, Severity::Error, format_error)
}
FormatModuleError::PrintError(print_error) => {
Diagnostic::new(DiagnosticId::InternalError, Severity::Error, print_error)
}
}
}
}
#[tracing::instrument(name = "format", level = Level::TRACE, skip_all)]
pub fn format_module_source(
source: &str,

View File

@@ -404,10 +404,18 @@ fn ensure_stability_when_formatting_twice(
let reformatted = match format_module_source(formatted_code, options.clone()) {
Ok(reformatted) => reformatted,
Err(err) => {
let mut diag = Diagnostic::from(&err);
if let Some(range) = err.range() {
let file =
SourceFileBuilder::new(input_path.to_string_lossy(), formatted_code).finish();
let span = Span::from(file).with_range(range);
diag.annotate(Annotation::primary(span));
}
panic!(
"Expected formatted code of {} to be valid syntax: {err}:\
\n---\n{formatted_code}---\n",
input_path.display()
\n---\n{formatted_code}---\n{}",
input_path.display(),
diag.display(&DummyFileResolver, &DisplayDiagnosticConfig::default()),
);
}
};

View File

@@ -133,6 +133,17 @@ impl SemanticSyntaxChecker {
}
Self::duplicate_parameter_name(parameters, ctx);
}
Stmt::Global(ast::StmtGlobal { names, .. }) => {
for name in names {
if ctx.is_bound_parameter(name) {
Self::add_error(
ctx,
SemanticSyntaxErrorKind::GlobalParameter(name.to_string()),
name.range,
);
}
}
}
Stmt::ClassDef(ast::StmtClassDef { type_params, .. })
| Stmt::TypeAlias(ast::StmtTypeAlias { type_params, .. }) => {
if let Some(type_params) = type_params {
@@ -1137,6 +1148,9 @@ impl Display for SemanticSyntaxError {
}
SemanticSyntaxErrorKind::BreakOutsideLoop => f.write_str("`break` outside loop"),
SemanticSyntaxErrorKind::ContinueOutsideLoop => f.write_str("`continue` outside loop"),
SemanticSyntaxErrorKind::GlobalParameter(name) => {
write!(f, "name `{name}` is parameter and global")
}
SemanticSyntaxErrorKind::DifferentMatchPatternBindings => {
write!(f, "alternative patterns bind different names")
}
@@ -1520,6 +1534,13 @@ pub enum SemanticSyntaxErrorKind {
/// Represents the use of a `continue` statement outside of a loop.
ContinueOutsideLoop,
/// Represents a function parameter that is also declared as `global`.
///
/// Declaring a parameter as `global` is invalid, since parameters are already
/// bound in the local scope of the function. Using `global` on them introduces
/// ambiguity and will result in a `SyntaxError`.
GlobalParameter(String),
/// Represents the use of alternative patterns in a `match` statement that bind different names.
///
/// Python requires all alternatives in an OR pattern (`|`) to bind the same set of names.
@@ -2054,6 +2075,8 @@ pub trait SemanticSyntaxContext {
fn report_semantic_error(&self, error: SemanticSyntaxError);
fn in_loop_context(&self) -> bool;
fn is_bound_parameter(&self, name: &str) -> bool;
}
/// Modified version of [`std::str::EscapeDefault`] that does not escape single or double quotes.

View File

@@ -486,7 +486,7 @@ impl TokenKind {
///
/// [`as_unary_operator`]: TokenKind::as_unary_operator
#[inline]
pub(crate) const fn as_unary_arithmetic_operator(self) -> Option<UnaryOp> {
pub const fn as_unary_arithmetic_operator(self) -> Option<UnaryOp> {
Some(match self {
TokenKind::Plus => UnaryOp::UAdd,
TokenKind::Minus => UnaryOp::USub,
@@ -501,7 +501,7 @@ impl TokenKind {
///
/// [`as_unary_arithmetic_operator`]: TokenKind::as_unary_arithmetic_operator
#[inline]
pub(crate) const fn as_unary_operator(self) -> Option<UnaryOp> {
pub const fn as_unary_operator(self) -> Option<UnaryOp> {
Some(match self {
TokenKind::Plus => UnaryOp::UAdd,
TokenKind::Minus => UnaryOp::USub,
@@ -514,7 +514,7 @@ impl TokenKind {
/// Returns the [`BoolOp`] that corresponds to this token kind, if it is a boolean operator,
/// otherwise return [None].
#[inline]
pub(crate) const fn as_bool_operator(self) -> Option<BoolOp> {
pub const fn as_bool_operator(self) -> Option<BoolOp> {
Some(match self {
TokenKind::And => BoolOp::And,
TokenKind::Or => BoolOp::Or,
@@ -528,7 +528,7 @@ impl TokenKind {
/// Use [`as_augmented_assign_operator`] to match against an augmented assignment token.
///
/// [`as_augmented_assign_operator`]: TokenKind::as_augmented_assign_operator
pub(crate) const fn as_binary_operator(self) -> Option<Operator> {
pub const fn as_binary_operator(self) -> Option<Operator> {
Some(match self {
TokenKind::Plus => Operator::Add,
TokenKind::Minus => Operator::Sub,
@@ -550,7 +550,7 @@ impl TokenKind {
/// Returns the [`Operator`] that corresponds to this token kind, if it is
/// an augmented assignment operator, or [`None`] otherwise.
#[inline]
pub(crate) const fn as_augmented_assign_operator(self) -> Option<Operator> {
pub const fn as_augmented_assign_operator(self) -> Option<Operator> {
Some(match self {
TokenKind::PlusEqual => Operator::Add,
TokenKind::MinusEqual => Operator::Sub,

View File

@@ -575,6 +575,10 @@ impl SemanticSyntaxContext for SemanticSyntaxCheckerVisitor<'_> {
fn in_loop_context(&self) -> bool {
true
}
fn is_bound_parameter(&self, _name: &str) -> bool {
false
}
}
impl Visitor<'_> for SemanticSyntaxCheckerVisitor<'_> {

View File

@@ -148,8 +148,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 109..110,
node_index: NodeIndex(None),
range: 109..110,
pattern: None,
name: None,
},

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 24..25,
node_index: NodeIndex(None),
range: 24..25,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -49,8 +49,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 36..37,
node_index: NodeIndex(None),
range: 36..37,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -27,8 +27,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 10..12,
node_index: NodeIndex(None),
range: 10..12,
name: Identifier {
id: Name("T1"),
range: 10..12,
@@ -40,8 +40,8 @@ Module(
),
TypeVarTuple(
TypeParamTypeVarTuple {
range: 14..17,
node_index: NodeIndex(None),
range: 14..17,
name: Identifier {
id: Name("T2"),
range: 15..17,

View File

@@ -27,8 +27,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 54..69,
node_index: NodeIndex(None),
range: 54..69,
name: Identifier {
id: Name("S"),
range: 54..55,
@@ -67,8 +67,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 71..79,
node_index: NodeIndex(None),
range: 71..79,
name: Identifier {
id: Name("T"),
range: 71..72,
@@ -89,8 +89,8 @@ Module(
),
TypeVarTuple(
TypeParamTypeVarTuple {
range: 81..84,
node_index: NodeIndex(None),
range: 81..84,
name: Identifier {
id: Name("Ts"),
range: 82..84,
@@ -101,8 +101,8 @@ Module(
),
ParamSpec(
TypeParamParamSpec {
range: 86..89,
node_index: NodeIndex(None),
range: 86..89,
name: Identifier {
id: Name("P"),
range: 88..89,

View File

@@ -55,8 +55,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 43..52,
node_index: NodeIndex(None),
range: 43..52,
name: Identifier {
id: Name("__debug__"),
range: 43..52,

View File

@@ -66,8 +66,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 44..53,
node_index: NodeIndex(None),
range: 44..53,
name: Identifier {
id: Name("__debug__"),
range: 44..53,

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 18..27,
node_index: NodeIndex(None),
range: 18..27,
pattern: None,
name: Some(
Identifier {

View File

@@ -67,8 +67,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 78..87,
node_index: NodeIndex(None),
range: 78..87,
name: Identifier {
id: Name("__debug__"),
range: 78..87,

View File

@@ -28,18 +28,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 18..27,
node_index: NodeIndex(None),
range: 18..27,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 18..21,
node_index: NodeIndex(None),
range: 18..21,
patterns: [
MatchAs(
PatternMatchAs {
range: 19..20,
node_index: NodeIndex(None),
range: 19..20,
pattern: None,
name: Some(
Identifier {
@@ -55,13 +55,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 24..27,
node_index: NodeIndex(None),
range: 24..27,
patterns: [
MatchAs(
PatternMatchAs {
range: 25..26,
node_index: NodeIndex(None),
range: 25..26,
pattern: None,
name: Some(
Identifier {
@@ -99,18 +99,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 42..50,
node_index: NodeIndex(None),
range: 42..50,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 42..45,
node_index: NodeIndex(None),
range: 42..45,
patterns: [
MatchAs(
PatternMatchAs {
range: 43..44,
node_index: NodeIndex(None),
range: 43..44,
pattern: None,
name: Some(
Identifier {
@@ -126,8 +126,8 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 48..50,
node_index: NodeIndex(None),
range: 48..50,
patterns: [],
},
),
@@ -155,18 +155,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 65..78,
node_index: NodeIndex(None),
range: 65..78,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 65..71,
node_index: NodeIndex(None),
range: 65..71,
patterns: [
MatchAs(
PatternMatchAs {
range: 66..67,
node_index: NodeIndex(None),
range: 66..67,
pattern: None,
name: Some(
Identifier {
@@ -179,8 +179,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 69..70,
node_index: NodeIndex(None),
range: 69..70,
pattern: None,
name: Some(
Identifier {
@@ -196,13 +196,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 74..78,
node_index: NodeIndex(None),
range: 74..78,
patterns: [
MatchAs(
PatternMatchAs {
range: 75..76,
node_index: NodeIndex(None),
range: 75..76,
pattern: None,
name: Some(
Identifier {
@@ -240,18 +240,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 93..108,
node_index: NodeIndex(None),
range: 93..108,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 93..99,
node_index: NodeIndex(None),
range: 93..99,
patterns: [
MatchAs(
PatternMatchAs {
range: 94..95,
node_index: NodeIndex(None),
range: 94..95,
pattern: None,
name: Some(
Identifier {
@@ -264,8 +264,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 97..98,
node_index: NodeIndex(None),
range: 97..98,
pattern: None,
name: None,
},
@@ -275,13 +275,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 102..108,
node_index: NodeIndex(None),
range: 102..108,
patterns: [
MatchAs(
PatternMatchAs {
range: 103..104,
node_index: NodeIndex(None),
range: 103..104,
pattern: None,
name: Some(
Identifier {
@@ -294,8 +294,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 106..107,
node_index: NodeIndex(None),
range: 106..107,
pattern: None,
name: Some(
Identifier {
@@ -333,13 +333,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 123..135,
node_index: NodeIndex(None),
range: 123..135,
patterns: [
MatchAs(
PatternMatchAs {
range: 124..125,
node_index: NodeIndex(None),
range: 124..125,
pattern: None,
name: Some(
Identifier {
@@ -352,13 +352,13 @@ Module(
),
MatchOr(
PatternMatchOr {
range: 128..133,
node_index: NodeIndex(None),
range: 128..133,
patterns: [
MatchAs(
PatternMatchAs {
range: 128..129,
node_index: NodeIndex(None),
range: 128..129,
pattern: None,
name: Some(
Identifier {
@@ -371,8 +371,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 132..133,
node_index: NodeIndex(None),
range: 132..133,
pattern: None,
name: Some(
Identifier {
@@ -410,18 +410,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 150..165,
node_index: NodeIndex(None),
range: 150..165,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 150..153,
node_index: NodeIndex(None),
range: 150..153,
patterns: [
MatchAs(
PatternMatchAs {
range: 151..152,
node_index: NodeIndex(None),
range: 151..152,
pattern: None,
name: Some(
Identifier {
@@ -437,13 +437,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 156..159,
node_index: NodeIndex(None),
range: 156..159,
patterns: [
MatchAs(
PatternMatchAs {
range: 157..158,
node_index: NodeIndex(None),
range: 157..158,
pattern: None,
name: Some(
Identifier {
@@ -459,13 +459,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 162..165,
node_index: NodeIndex(None),
range: 162..165,
patterns: [
MatchAs(
PatternMatchAs {
range: 163..164,
node_index: NodeIndex(None),
range: 163..164,
pattern: None,
name: Some(
Identifier {
@@ -503,25 +503,25 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 180..188,
node_index: NodeIndex(None),
range: 180..188,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 180..182,
node_index: NodeIndex(None),
range: 180..182,
patterns: [],
},
),
MatchSequence(
PatternMatchSequence {
range: 185..188,
node_index: NodeIndex(None),
range: 185..188,
patterns: [
MatchAs(
PatternMatchAs {
range: 186..187,
node_index: NodeIndex(None),
range: 186..187,
pattern: None,
name: Some(
Identifier {
@@ -559,18 +559,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 203..215,
node_index: NodeIndex(None),
range: 203..215,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 203..206,
node_index: NodeIndex(None),
range: 203..206,
patterns: [
MatchAs(
PatternMatchAs {
range: 204..205,
node_index: NodeIndex(None),
range: 204..205,
pattern: None,
name: Some(
Identifier {
@@ -586,13 +586,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 209..215,
node_index: NodeIndex(None),
range: 209..215,
patterns: [
MatchClass(
PatternMatchClass {
range: 210..214,
node_index: NodeIndex(None),
range: 210..214,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -607,8 +607,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 212..213,
node_index: NodeIndex(None),
range: 212..213,
pattern: None,
name: Some(
Identifier {
@@ -651,23 +651,23 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 230..241,
node_index: NodeIndex(None),
range: 230..241,
patterns: [
MatchOr(
PatternMatchOr {
range: 231..240,
node_index: NodeIndex(None),
range: 231..240,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 231..234,
node_index: NodeIndex(None),
range: 231..234,
patterns: [
MatchAs(
PatternMatchAs {
range: 232..233,
node_index: NodeIndex(None),
range: 232..233,
pattern: None,
name: Some(
Identifier {
@@ -683,13 +683,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 237..240,
node_index: NodeIndex(None),
range: 237..240,
patterns: [
MatchAs(
PatternMatchAs {
range: 238..239,
node_index: NodeIndex(None),
range: 238..239,
pattern: None,
name: Some(
Identifier {
@@ -730,18 +730,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 256..271,
node_index: NodeIndex(None),
range: 256..271,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 256..262,
node_index: NodeIndex(None),
range: 256..262,
patterns: [
MatchClass(
PatternMatchClass {
range: 257..261,
node_index: NodeIndex(None),
range: 257..261,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -756,8 +756,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 259..260,
node_index: NodeIndex(None),
range: 259..260,
pattern: None,
name: Some(
Identifier {
@@ -778,13 +778,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 265..271,
node_index: NodeIndex(None),
range: 265..271,
patterns: [
MatchClass(
PatternMatchClass {
range: 266..270,
node_index: NodeIndex(None),
range: 266..270,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -799,8 +799,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 268..269,
node_index: NodeIndex(None),
range: 268..269,
pattern: None,
name: Some(
Identifier {
@@ -843,18 +843,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 286..307,
node_index: NodeIndex(None),
range: 286..307,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 286..295,
node_index: NodeIndex(None),
range: 286..295,
patterns: [
MatchClass(
PatternMatchClass {
range: 287..294,
node_index: NodeIndex(None),
range: 287..294,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -869,8 +869,8 @@ Module(
patterns: [
MatchClass(
PatternMatchClass {
range: 289..293,
node_index: NodeIndex(None),
range: 289..293,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -885,8 +885,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 291..292,
node_index: NodeIndex(None),
range: 291..292,
pattern: None,
name: Some(
Identifier {
@@ -912,13 +912,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 298..307,
node_index: NodeIndex(None),
range: 298..307,
patterns: [
MatchClass(
PatternMatchClass {
range: 299..306,
node_index: NodeIndex(None),
range: 299..306,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -933,8 +933,8 @@ Module(
patterns: [
MatchClass(
PatternMatchClass {
range: 301..305,
node_index: NodeIndex(None),
range: 301..305,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -949,8 +949,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 303..304,
node_index: NodeIndex(None),
range: 303..304,
pattern: None,
name: Some(
Identifier {
@@ -998,23 +998,23 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 322..341,
node_index: NodeIndex(None),
range: 322..341,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 322..330,
node_index: NodeIndex(None),
range: 322..330,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 323..329,
node_index: NodeIndex(None),
range: 323..329,
patterns: [
MatchAs(
PatternMatchAs {
range: 324..325,
node_index: NodeIndex(None),
range: 324..325,
pattern: None,
name: Some(
Identifier {
@@ -1027,8 +1027,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 327..328,
node_index: NodeIndex(None),
range: 327..328,
pattern: None,
name: Some(
Identifier {
@@ -1047,18 +1047,18 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 333..341,
node_index: NodeIndex(None),
range: 333..341,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 334..340,
node_index: NodeIndex(None),
range: 334..340,
patterns: [
MatchAs(
PatternMatchAs {
range: 335..336,
node_index: NodeIndex(None),
range: 335..336,
pattern: None,
name: Some(
Identifier {
@@ -1071,8 +1071,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 338..339,
node_index: NodeIndex(None),
range: 338..339,
pattern: None,
name: Some(
Identifier {

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 18..33,
node_index: NodeIndex(None),
range: 18..33,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -53,8 +53,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 26..27,
node_index: NodeIndex(None),
range: 26..27,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -77,8 +77,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 31..32,
node_index: NodeIndex(None),
range: 31..32,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -116,13 +116,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 48..65,
node_index: NodeIndex(None),
range: 48..65,
patterns: [
MatchClass(
PatternMatchClass {
range: 49..64,
node_index: NodeIndex(None),
range: 49..64,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -146,8 +146,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 57..58,
node_index: NodeIndex(None),
range: 57..58,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -170,8 +170,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 62..63,
node_index: NodeIndex(None),
range: 62..63,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -212,8 +212,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 80..108,
node_index: NodeIndex(None),
range: 80..108,
keys: [
StringLiteral(
ExprStringLiteral {
@@ -261,8 +261,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 86..87,
node_index: NodeIndex(None),
range: 86..87,
pattern: None,
name: Some(
Identifier {
@@ -275,8 +275,8 @@ Module(
),
MatchClass(
PatternMatchClass {
range: 94..107,
node_index: NodeIndex(None),
range: 94..107,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -300,8 +300,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 100..101,
node_index: NodeIndex(None),
range: 100..101,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -324,8 +324,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 105..106,
node_index: NodeIndex(None),
range: 105..106,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -367,13 +367,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 123..157,
node_index: NodeIndex(None),
range: 123..157,
patterns: [
MatchMapping(
PatternMatchMapping {
range: 124..126,
node_index: NodeIndex(None),
range: 124..126,
keys: [],
patterns: [],
rest: None,
@@ -381,8 +381,8 @@ Module(
),
MatchMapping(
PatternMatchMapping {
range: 128..156,
node_index: NodeIndex(None),
range: 128..156,
keys: [
StringLiteral(
ExprStringLiteral {
@@ -430,8 +430,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 134..135,
node_index: NodeIndex(None),
range: 134..135,
pattern: None,
name: Some(
Identifier {
@@ -444,8 +444,8 @@ Module(
),
MatchClass(
PatternMatchClass {
range: 142..155,
node_index: NodeIndex(None),
range: 142..155,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -469,8 +469,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 148..149,
node_index: NodeIndex(None),
range: 148..149,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -493,8 +493,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 153..154,
node_index: NodeIndex(None),
range: 153..154,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -539,8 +539,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 172..225,
node_index: NodeIndex(None),
range: 172..225,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -564,8 +564,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 180..181,
node_index: NodeIndex(None),
range: 180..181,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -588,8 +588,8 @@ Module(
},
pattern: MatchMapping(
PatternMatchMapping {
range: 185..201,
node_index: NodeIndex(None),
range: 185..201,
keys: [
StringLiteral(
ExprStringLiteral {
@@ -637,8 +637,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 191..192,
node_index: NodeIndex(None),
range: 191..192,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -652,8 +652,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 199..200,
node_index: NodeIndex(None),
range: 199..200,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -680,8 +680,8 @@ Module(
},
pattern: MatchClass(
PatternMatchClass {
range: 209..224,
node_index: NodeIndex(None),
range: 209..224,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -705,8 +705,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 217..218,
node_index: NodeIndex(None),
range: 217..218,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -729,8 +729,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 222..223,
node_index: NodeIndex(None),
range: 222..223,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 18..34,
node_index: NodeIndex(None),
range: 18..34,
keys: [
StringLiteral(
ExprStringLiteral {
@@ -77,8 +77,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 24..25,
node_index: NodeIndex(None),
range: 24..25,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -92,8 +92,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 32..33,
node_index: NodeIndex(None),
range: 32..33,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -130,8 +130,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 49..67,
node_index: NodeIndex(None),
range: 49..67,
keys: [
BytesLiteral(
ExprBytesLiteral {
@@ -183,8 +183,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 56..57,
node_index: NodeIndex(None),
range: 56..57,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -198,8 +198,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 65..66,
node_index: NodeIndex(None),
range: 65..66,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -236,8 +236,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 82..94,
node_index: NodeIndex(None),
range: 82..94,
keys: [
NumberLiteral(
ExprNumberLiteral {
@@ -261,8 +261,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 86..87,
node_index: NodeIndex(None),
range: 86..87,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -276,8 +276,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 92..93,
node_index: NodeIndex(None),
range: 92..93,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -314,8 +314,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 109..125,
node_index: NodeIndex(None),
range: 109..125,
keys: [
NumberLiteral(
ExprNumberLiteral {
@@ -339,8 +339,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 115..116,
node_index: NodeIndex(None),
range: 115..116,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -354,8 +354,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 123..124,
node_index: NodeIndex(None),
range: 123..124,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -392,8 +392,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 140..166,
node_index: NodeIndex(None),
range: 140..166,
keys: [
BinOp(
ExprBinOp {
@@ -451,8 +451,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 151..152,
node_index: NodeIndex(None),
range: 151..152,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -466,8 +466,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 164..165,
node_index: NodeIndex(None),
range: 164..165,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -504,8 +504,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 181..199,
node_index: NodeIndex(None),
range: 181..199,
keys: [
BooleanLiteral(
ExprBooleanLiteral {
@@ -525,8 +525,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 188..189,
node_index: NodeIndex(None),
range: 188..189,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -540,8 +540,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 197..198,
node_index: NodeIndex(None),
range: 197..198,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -578,8 +578,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 214..232,
node_index: NodeIndex(None),
range: 214..232,
keys: [
NoneLiteral(
ExprNoneLiteral {
@@ -597,8 +597,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 221..222,
node_index: NodeIndex(None),
range: 221..222,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -612,8 +612,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 230..231,
node_index: NodeIndex(None),
range: 230..231,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -650,8 +650,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 247..314,
node_index: NodeIndex(None),
range: 247..314,
keys: [
StringLiteral(
ExprStringLiteral {
@@ -699,8 +699,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 279..280,
node_index: NodeIndex(None),
range: 279..280,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -714,8 +714,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 312..313,
node_index: NodeIndex(None),
range: 312..313,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -752,8 +752,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 329..353,
node_index: NodeIndex(None),
range: 329..353,
keys: [
StringLiteral(
ExprStringLiteral {
@@ -822,8 +822,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 335..336,
node_index: NodeIndex(None),
range: 335..336,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -837,8 +837,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 343..344,
node_index: NodeIndex(None),
range: 343..344,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -852,8 +852,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 351..352,
node_index: NodeIndex(None),
range: 351..352,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -890,8 +890,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 368..396,
node_index: NodeIndex(None),
range: 368..396,
keys: [
NumberLiteral(
ExprNumberLiteral {
@@ -957,8 +957,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 372..373,
node_index: NodeIndex(None),
range: 372..373,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -972,8 +972,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 380..381,
node_index: NodeIndex(None),
range: 380..381,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -987,8 +987,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 386..387,
node_index: NodeIndex(None),
range: 386..387,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1002,8 +1002,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 394..395,
node_index: NodeIndex(None),
range: 394..395,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1040,13 +1040,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 411..429,
node_index: NodeIndex(None),
range: 411..429,
patterns: [
MatchMapping(
PatternMatchMapping {
range: 412..428,
node_index: NodeIndex(None),
range: 412..428,
keys: [
StringLiteral(
ExprStringLiteral {
@@ -1094,8 +1094,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 418..419,
node_index: NodeIndex(None),
range: 418..419,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1109,8 +1109,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 426..427,
node_index: NodeIndex(None),
range: 426..427,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1150,8 +1150,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 444..472,
node_index: NodeIndex(None),
range: 444..472,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -1175,8 +1175,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 450..451,
node_index: NodeIndex(None),
range: 450..451,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1199,8 +1199,8 @@ Module(
},
pattern: MatchMapping(
PatternMatchMapping {
range: 455..471,
node_index: NodeIndex(None),
range: 455..471,
keys: [
StringLiteral(
ExprStringLiteral {
@@ -1248,8 +1248,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 461..462,
node_index: NodeIndex(None),
range: 461..462,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1263,8 +1263,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 469..470,
node_index: NodeIndex(None),
range: 469..470,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1306,13 +1306,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 487..527,
node_index: NodeIndex(None),
range: 487..527,
patterns: [
MatchClass(
PatternMatchClass {
range: 488..496,
node_index: NodeIndex(None),
range: 488..496,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -1336,8 +1336,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 494..495,
node_index: NodeIndex(None),
range: 494..495,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1356,8 +1356,8 @@ Module(
),
MatchClass(
PatternMatchClass {
range: 498..526,
node_index: NodeIndex(None),
range: 498..526,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -1381,8 +1381,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 504..505,
node_index: NodeIndex(None),
range: 504..505,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1405,8 +1405,8 @@ Module(
},
pattern: MatchMapping(
PatternMatchMapping {
range: 509..525,
node_index: NodeIndex(None),
range: 509..525,
keys: [
StringLiteral(
ExprStringLiteral {
@@ -1454,8 +1454,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 515..516,
node_index: NodeIndex(None),
range: 515..516,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -1469,8 +1469,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 523..524,
node_index: NodeIndex(None),
range: 523..524,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 11..12,
node_index: NodeIndex(None),
range: 11..12,
name: Identifier {
id: Name("T"),
range: 11..12,
@@ -42,8 +42,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 14..15,
node_index: NodeIndex(None),
range: 14..15,
name: Identifier {
id: Name("T"),
range: 14..15,
@@ -82,8 +82,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 29..30,
node_index: NodeIndex(None),
range: 29..30,
name: Identifier {
id: Name("T"),
range: 29..30,
@@ -95,8 +95,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 32..33,
node_index: NodeIndex(None),
range: 32..33,
name: Identifier {
id: Name("T"),
range: 32..33,
@@ -177,8 +177,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 54..55,
node_index: NodeIndex(None),
range: 54..55,
name: Identifier {
id: Name("T"),
range: 54..55,
@@ -190,8 +190,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 57..58,
node_index: NodeIndex(None),
range: 57..58,
name: Identifier {
id: Name("T"),
range: 57..58,
@@ -240,8 +240,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 76..77,
node_index: NodeIndex(None),
range: 76..77,
name: Identifier {
id: Name("T"),
range: 76..77,
@@ -253,8 +253,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 79..85,
node_index: NodeIndex(None),
range: 79..85,
name: Identifier {
id: Name("U"),
range: 79..80,
@@ -275,8 +275,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 87..102,
node_index: NodeIndex(None),
range: 87..102,
name: Identifier {
id: Name("V"),
range: 87..88,
@@ -315,8 +315,8 @@ Module(
),
TypeVarTuple(
TypeParamTypeVarTuple {
range: 104..107,
node_index: NodeIndex(None),
range: 104..107,
name: Identifier {
id: Name("Ts"),
range: 105..107,
@@ -327,8 +327,8 @@ Module(
),
ParamSpec(
TypeParamParamSpec {
range: 109..112,
node_index: NodeIndex(None),
range: 109..112,
name: Identifier {
id: Name("P"),
range: 111..112,
@@ -339,8 +339,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 114..125,
node_index: NodeIndex(None),
range: 114..125,
name: Identifier {
id: Name("T"),
range: 114..115,
@@ -388,8 +388,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 139..140,
node_index: NodeIndex(None),
range: 139..140,
name: Identifier {
id: Name("T"),
range: 139..140,
@@ -401,8 +401,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 142..143,
node_index: NodeIndex(None),
range: 142..143,
name: Identifier {
id: Name("T"),
range: 142..143,
@@ -414,8 +414,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 145..146,
node_index: NodeIndex(None),
range: 145..146,
name: Identifier {
id: Name("T"),
range: 145..146,
@@ -472,8 +472,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 175..176,
node_index: NodeIndex(None),
range: 175..176,
name: Identifier {
id: Name("T"),
range: 175..176,
@@ -485,8 +485,8 @@ Module(
),
TypeVarTuple(
TypeParamTypeVarTuple {
range: 178..180,
node_index: NodeIndex(None),
range: 178..180,
name: Identifier {
id: Name("T"),
range: 179..180,
@@ -542,8 +542,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 224..225,
node_index: NodeIndex(None),
range: 224..225,
name: Identifier {
id: Name("T"),
range: 224..225,
@@ -555,8 +555,8 @@ Module(
),
ParamSpec(
TypeParamParamSpec {
range: 227..230,
node_index: NodeIndex(None),
range: 227..230,
name: Identifier {
id: Name("T"),
range: 229..230,

View File

@@ -28,8 +28,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 8..10,
node_index: NodeIndex(None),
range: 8..10,
name: Identifier {
id: Name("T1"),
range: 8..10,
@@ -41,8 +41,8 @@ Module(
),
TypeVarTuple(
TypeParamTypeVarTuple {
range: 12..15,
node_index: NodeIndex(None),
range: 12..15,
name: Identifier {
id: Name("T2"),
range: 13..15,

View File

@@ -28,8 +28,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 52..53,
node_index: NodeIndex(None),
range: 52..53,
name: Identifier {
id: Name("T"),
range: 52..53,

View File

@@ -27,8 +27,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 8..9,
node_index: NodeIndex(None),
range: 8..9,
name: Identifier {
id: Name("T"),
range: 8..9,
@@ -105,8 +105,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 35..36,
node_index: NodeIndex(None),
range: 35..36,
name: Identifier {
id: Name("T"),
range: 35..36,
@@ -178,8 +178,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 62..63,
node_index: NodeIndex(None),
range: 62..63,
name: Identifier {
id: Name("T"),
range: 62..63,
@@ -249,8 +249,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 94..106,
node_index: NodeIndex(None),
range: 94..106,
name: Identifier {
id: Name("T"),
range: 94..95,
@@ -315,8 +315,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 145..156,
node_index: NodeIndex(None),
range: 145..156,
name: Identifier {
id: Name("T"),
range: 145..146,
@@ -387,8 +387,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 201..202,
node_index: NodeIndex(None),
range: 201..202,
name: Identifier {
id: Name("T"),
range: 201..202,
@@ -458,8 +458,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 228..240,
node_index: NodeIndex(None),
range: 228..240,
name: Identifier {
id: Name("T"),
range: 228..229,

View File

@@ -28,8 +28,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 6..7,
node_index: NodeIndex(None),
range: 6..7,
name: Identifier {
id: Name("T"),
range: 6..7,
@@ -102,8 +102,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 35..36,
node_index: NodeIndex(None),
range: 35..36,
name: Identifier {
id: Name("T"),
range: 35..36,
@@ -192,8 +192,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 65..66,
node_index: NodeIndex(None),
range: 65..66,
name: Identifier {
id: Name("T"),
range: 65..66,
@@ -274,8 +274,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 93..94,
node_index: NodeIndex(None),
range: 93..94,
name: Identifier {
id: Name("T"),
range: 93..94,
@@ -372,8 +372,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 122..123,
node_index: NodeIndex(None),
range: 122..123,
name: Identifier {
id: Name("T"),
range: 122..123,
@@ -464,8 +464,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 150..151,
node_index: NodeIndex(None),
range: 150..151,
name: Identifier {
id: Name("T"),
range: 150..151,
@@ -540,8 +540,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 179..180,
node_index: NodeIndex(None),
range: 179..180,
name: Identifier {
id: Name("T"),
range: 179..180,
@@ -630,8 +630,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 212..213,
node_index: NodeIndex(None),
range: 212..213,
name: Identifier {
id: Name("T"),
range: 212..213,
@@ -704,8 +704,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 246..258,
node_index: NodeIndex(None),
range: 246..258,
name: Identifier {
id: Name("T"),
range: 246..247,
@@ -780,8 +780,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 303..316,
node_index: NodeIndex(None),
range: 303..316,
name: Identifier {
id: Name("T"),
range: 303..304,
@@ -856,8 +856,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 362..377,
node_index: NodeIndex(None),
range: 362..377,
name: Identifier {
id: Name("Ts"),
range: 363..365,
@@ -931,8 +931,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 426..442,
node_index: NodeIndex(None),
range: 426..442,
name: Identifier {
id: Name("Ts"),
range: 428..430,
@@ -1006,8 +1006,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 487..498,
node_index: NodeIndex(None),
range: 487..498,
name: Identifier {
id: Name("T"),
range: 487..488,
@@ -1088,8 +1088,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 549..561,
node_index: NodeIndex(None),
range: 549..561,
name: Identifier {
id: Name("T"),
range: 549..550,
@@ -1170,8 +1170,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 613..627,
node_index: NodeIndex(None),
range: 613..627,
name: Identifier {
id: Name("Ts"),
range: 614..616,
@@ -1251,8 +1251,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 682..697,
node_index: NodeIndex(None),
range: 682..697,
name: Identifier {
id: Name("Ts"),
range: 684..686,
@@ -1332,8 +1332,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 748..760,
node_index: NodeIndex(None),
range: 748..760,
name: Identifier {
id: Name("T"),
range: 748..749,
@@ -1406,8 +1406,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 806..819,
node_index: NodeIndex(None),
range: 806..819,
name: Identifier {
id: Name("T"),
range: 806..807,
@@ -1480,8 +1480,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 866..881,
node_index: NodeIndex(None),
range: 866..881,
name: Identifier {
id: Name("Ts"),
range: 867..869,
@@ -1553,8 +1553,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 931..947,
node_index: NodeIndex(None),
range: 931..947,
name: Identifier {
id: Name("Ts"),
range: 933..935,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 7..19,
node_index: NodeIndex(None),
range: 7..19,
name: Identifier {
id: Name("T"),
range: 7..8,
@@ -90,8 +90,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 55..68,
node_index: NodeIndex(None),
range: 55..68,
name: Identifier {
id: Name("T"),
range: 55..56,
@@ -151,8 +151,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 105..120,
node_index: NodeIndex(None),
range: 105..120,
name: Identifier {
id: Name("Ts"),
range: 106..108,
@@ -211,8 +211,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 160..176,
node_index: NodeIndex(None),
range: 160..176,
name: Identifier {
id: Name("Ts"),
range: 162..164,
@@ -341,8 +341,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 315..327,
node_index: NodeIndex(None),
range: 315..327,
name: Identifier {
id: Name("T"),
range: 315..316,

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 18..21,
node_index: NodeIndex(None),
range: 18..21,
pattern: None,
name: Some(
Identifier {
@@ -61,8 +61,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 55..56,
node_index: NodeIndex(None),
range: 55..56,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -111,8 +111,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 80..81,
node_index: NodeIndex(None),
range: 80..81,
pattern: None,
name: None,
},
@@ -138,8 +138,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 96..97,
node_index: NodeIndex(None),
range: 96..97,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -188,13 +188,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 143..155,
node_index: NodeIndex(None),
range: 143..155,
pattern: Some(
MatchAs(
PatternMatchAs {
range: 143..147,
node_index: NodeIndex(None),
range: 143..147,
pattern: None,
name: Some(
Identifier {
@@ -236,8 +236,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 216..217,
node_index: NodeIndex(None),
range: 216..217,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -286,13 +286,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 241..259,
node_index: NodeIndex(None),
range: 241..259,
patterns: [
MatchValue(
PatternMatchValue {
range: 241..253,
node_index: NodeIndex(None),
range: 241..253,
value: Attribute(
ExprAttribute {
node_index: NodeIndex(None),
@@ -317,8 +317,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 256..259,
node_index: NodeIndex(None),
range: 256..259,
pattern: None,
name: Some(
Identifier {
@@ -353,8 +353,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 310..311,
node_index: NodeIndex(None),
range: 310..311,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -29,8 +29,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 63..64,
node_index: NodeIndex(None),
range: 63..64,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -36,8 +36,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 26..27,
node_index: NodeIndex(None),
range: 26..27,
pattern: None,
name: None,
},

View File

@@ -35,8 +35,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 32..33,
node_index: NodeIndex(None),
range: 32..33,
pattern: None,
name: None,
},

View File

@@ -47,8 +47,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 22..23,
node_index: NodeIndex(None),
range: 22..23,
pattern: None,
name: None,
},

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 16..17,
node_index: NodeIndex(None),
range: 16..17,
pattern: None,
name: None,
},

View File

@@ -83,8 +83,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 54..55,
node_index: NodeIndex(None),
range: 54..55,
pattern: None,
name: None,
},

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 18..19,
node_index: NodeIndex(None),
range: 18..19,
pattern: None,
name: Some(
Identifier {
@@ -93,8 +93,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 49..50,
node_index: NodeIndex(None),
range: 49..50,
pattern: None,
name: Some(
Identifier {
@@ -158,8 +158,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 82..83,
node_index: NodeIndex(None),
range: 82..83,
pattern: None,
name: Some(
Identifier {

View File

@@ -35,8 +35,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 21..22,
node_index: NodeIndex(None),
range: 21..22,
pattern: None,
name: None,
},
@@ -120,8 +120,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 93..94,
node_index: NodeIndex(None),
range: 93..94,
pattern: None,
name: None,
},
@@ -171,8 +171,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 124..125,
node_index: NodeIndex(None),
range: 124..125,
pattern: None,
name: None,
},

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 18..19,
node_index: NodeIndex(None),
range: 18..19,
pattern: None,
name: Some(
Identifier {

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 17..17,
node_index: NodeIndex(None),
range: 17..17,
value: Name(
ExprName {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 16..17,
node_index: NodeIndex(None),
range: 16..17,
pattern: None,
name: None,
},

View File

@@ -35,8 +35,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 21..22,
node_index: NodeIndex(None),
range: 21..22,
pattern: None,
name: None,
},

View File

@@ -29,13 +29,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 18..27,
node_index: NodeIndex(None),
range: 18..27,
patterns: [
MatchAs(
PatternMatchAs {
range: 19..20,
node_index: NodeIndex(None),
range: 19..20,
pattern: None,
name: Some(
Identifier {
@@ -48,8 +48,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 22..23,
node_index: NodeIndex(None),
range: 22..23,
pattern: None,
name: Some(
Identifier {
@@ -62,8 +62,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 25..26,
node_index: NodeIndex(None),
range: 25..26,
pattern: None,
name: Some(
Identifier {
@@ -98,13 +98,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 59..69,
node_index: NodeIndex(None),
range: 59..69,
patterns: [
MatchAs(
PatternMatchAs {
range: 60..61,
node_index: NodeIndex(None),
range: 60..61,
pattern: None,
name: Some(
Identifier {
@@ -117,8 +117,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 63..64,
node_index: NodeIndex(None),
range: 63..64,
pattern: None,
name: Some(
Identifier {
@@ -131,8 +131,8 @@ Module(
),
MatchStar(
PatternMatchStar {
range: 66..68,
node_index: NodeIndex(None),
range: 66..68,
name: Some(
Identifier {
id: Name("y"),
@@ -166,13 +166,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 101..110,
node_index: NodeIndex(None),
range: 101..110,
patterns: [
MatchAs(
PatternMatchAs {
range: 102..103,
node_index: NodeIndex(None),
range: 102..103,
pattern: None,
name: Some(
Identifier {
@@ -185,8 +185,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 105..106,
node_index: NodeIndex(None),
range: 105..106,
pattern: None,
name: Some(
Identifier {
@@ -199,8 +199,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 108..109,
node_index: NodeIndex(None),
range: 108..109,
pattern: None,
name: Some(
Identifier {
@@ -235,8 +235,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 151..163,
node_index: NodeIndex(None),
range: 151..163,
keys: [
NumberLiteral(
ExprNumberLiteral {
@@ -260,8 +260,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 155..156,
node_index: NodeIndex(None),
range: 155..156,
pattern: None,
name: Some(
Identifier {
@@ -274,8 +274,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 161..162,
node_index: NodeIndex(None),
range: 161..162,
pattern: None,
name: Some(
Identifier {
@@ -311,8 +311,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 212..223,
node_index: NodeIndex(None),
range: 212..223,
keys: [
NumberLiteral(
ExprNumberLiteral {
@@ -327,8 +327,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 216..217,
node_index: NodeIndex(None),
range: 216..217,
pattern: None,
name: Some(
Identifier {
@@ -370,8 +370,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 274..285,
node_index: NodeIndex(None),
range: 274..285,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -386,8 +386,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 280..281,
node_index: NodeIndex(None),
range: 280..281,
pattern: None,
name: Some(
Identifier {
@@ -400,8 +400,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 283..284,
node_index: NodeIndex(None),
range: 283..284,
pattern: None,
name: Some(
Identifier {
@@ -438,8 +438,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 325..340,
node_index: NodeIndex(None),
range: 325..340,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -463,8 +463,8 @@ Module(
},
pattern: MatchAs(
PatternMatchAs {
range: 333..334,
node_index: NodeIndex(None),
range: 333..334,
pattern: None,
name: Some(
Identifier {
@@ -486,8 +486,8 @@ Module(
},
pattern: MatchAs(
PatternMatchAs {
range: 338..339,
node_index: NodeIndex(None),
range: 338..339,
pattern: None,
name: Some(
Identifier {
@@ -524,18 +524,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 377..407,
node_index: NodeIndex(None),
range: 377..407,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 377..380,
node_index: NodeIndex(None),
range: 377..380,
patterns: [
MatchAs(
PatternMatchAs {
range: 378..379,
node_index: NodeIndex(None),
range: 378..379,
pattern: None,
name: Some(
Identifier {
@@ -551,8 +551,8 @@ Module(
),
MatchMapping(
PatternMatchMapping {
range: 383..389,
node_index: NodeIndex(None),
range: 383..389,
keys: [
NumberLiteral(
ExprNumberLiteral {
@@ -567,8 +567,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 387..388,
node_index: NodeIndex(None),
range: 387..388,
pattern: None,
name: Some(
Identifier {
@@ -585,8 +585,8 @@ Module(
),
MatchClass(
PatternMatchClass {
range: 392..407,
node_index: NodeIndex(None),
range: 392..407,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -610,8 +610,8 @@ Module(
},
pattern: MatchAs(
PatternMatchAs {
range: 400..401,
node_index: NodeIndex(None),
range: 400..401,
pattern: None,
name: Some(
Identifier {
@@ -633,8 +633,8 @@ Module(
},
pattern: MatchAs(
PatternMatchAs {
range: 405..406,
node_index: NodeIndex(None),
range: 405..406,
pattern: None,
name: Some(
Identifier {
@@ -674,13 +674,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 433..439,
node_index: NodeIndex(None),
range: 433..439,
pattern: Some(
MatchAs(
PatternMatchAs {
range: 433..434,
node_index: NodeIndex(None),
range: 433..434,
pattern: None,
name: Some(
Identifier {

View File

@@ -28,8 +28,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 808..809,
node_index: NodeIndex(None),
range: 808..809,
name: Identifier {
id: Name("A"),
range: 808..809,
@@ -41,8 +41,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 811..816,
node_index: NodeIndex(None),
range: 811..816,
name: Identifier {
id: Name("await"),
range: 811..816,
@@ -99,8 +99,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 847..848,
node_index: NodeIndex(None),
range: 847..848,
name: Identifier {
id: Name("A"),
range: 847..848,
@@ -112,8 +112,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 853..854,
node_index: NodeIndex(None),
range: 853..854,
name: Identifier {
id: Name("B"),
range: 853..854,
@@ -170,8 +170,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 884..885,
node_index: NodeIndex(None),
range: 884..885,
name: Identifier {
id: Name("A"),
range: 884..885,
@@ -183,8 +183,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 887..888,
node_index: NodeIndex(None),
range: 887..888,
name: Identifier {
id: Name("B"),
range: 887..888,
@@ -241,8 +241,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 927..928,
node_index: NodeIndex(None),
range: 927..928,
name: Identifier {
id: Name("A"),
range: 927..928,
@@ -299,8 +299,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 973..974,
node_index: NodeIndex(None),
range: 973..974,
name: Identifier {
id: Name("A"),
range: 973..974,

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 132..146,
node_index: NodeIndex(None),
range: 132..146,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -44,8 +44,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 141..142,
node_index: NodeIndex(None),
range: 141..142,
pattern: None,
name: Some(
Identifier {
@@ -58,8 +58,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 144..145,
node_index: NodeIndex(None),
range: 144..145,
pattern: None,
name: Some(
Identifier {

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 145..158,
node_index: NodeIndex(None),
range: 145..158,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),

View File

@@ -28,13 +28,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 164..170,
node_index: NodeIndex(None),
range: 164..170,
pattern: Some(
MatchAs(
PatternMatchAs {
range: 164..165,
node_index: NodeIndex(None),
range: 164..165,
pattern: None,
name: Some(
Identifier {

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 108..117,
node_index: NodeIndex(None),
range: 108..117,
cls: Dict(
ExprDict {
node_index: NodeIndex(None),
@@ -43,13 +43,13 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 110..116,
node_index: NodeIndex(None),
range: 110..116,
pattern: Some(
MatchAs(
PatternMatchAs {
range: 110..111,
node_index: NodeIndex(None),
range: 110..111,
pattern: None,
name: Some(
Identifier {

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 161..172,
node_index: NodeIndex(None),
range: 161..172,
keys: [
Name(
ExprName {
@@ -51,8 +51,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 164..166,
node_index: NodeIndex(None),
range: 164..166,
pattern: None,
name: Some(
Identifier {
@@ -65,8 +65,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 170..171,
node_index: NodeIndex(None),
range: 170..171,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 68..83,
node_index: NodeIndex(None),
range: 68..83,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -53,8 +53,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 81..82,
node_index: NodeIndex(None),
range: 81..82,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -86,8 +86,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 107..121,
node_index: NodeIndex(None),
range: 107..121,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -111,8 +111,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 119..120,
node_index: NodeIndex(None),
range: 119..120,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -144,8 +144,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 145..160,
node_index: NodeIndex(None),
range: 145..160,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -169,8 +169,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 158..159,
node_index: NodeIndex(None),
range: 158..159,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -202,8 +202,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 184..203,
node_index: NodeIndex(None),
range: 184..203,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -227,8 +227,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 201..202,
node_index: NodeIndex(None),
range: 201..202,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -260,8 +260,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 227..235,
node_index: NodeIndex(None),
range: 227..235,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -285,8 +285,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 233..234,
node_index: NodeIndex(None),
range: 233..234,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -318,8 +318,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 259..271,
node_index: NodeIndex(None),
range: 259..271,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -343,8 +343,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 269..270,
node_index: NodeIndex(None),
range: 269..270,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 36..46,
node_index: NodeIndex(None),
range: 36..46,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -84,8 +84,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 70..76,
node_index: NodeIndex(None),
range: 70..76,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -128,8 +128,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 100..106,
node_index: NodeIndex(None),
range: 100..106,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -172,8 +172,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 130..142,
node_index: NodeIndex(None),
range: 130..142,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -233,8 +233,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 166..177,
node_index: NodeIndex(None),
range: 166..177,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -296,8 +296,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 201..215,
node_index: NodeIndex(None),
range: 201..215,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -360,8 +360,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 239..246,
node_index: NodeIndex(None),
range: 239..246,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -406,8 +406,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 270..278,
node_index: NodeIndex(None),
range: 270..278,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -459,8 +459,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 302..318,
node_index: NodeIndex(None),
range: 302..318,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -540,8 +540,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 370..379,
node_index: NodeIndex(None),
range: 370..379,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -595,8 +595,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 403..408,
node_index: NodeIndex(None),
range: 403..408,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -638,8 +638,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 432..437,
node_index: NodeIndex(None),
range: 432..437,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -681,8 +681,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 461..472,
node_index: NodeIndex(None),
range: 461..472,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -741,8 +741,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 496..506,
node_index: NodeIndex(None),
range: 496..506,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -803,8 +803,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 530..543,
node_index: NodeIndex(None),
range: 530..543,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -866,8 +866,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 567..572,
node_index: NodeIndex(None),
range: 567..572,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -910,8 +910,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 596..611,
node_index: NodeIndex(None),
range: 596..611,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),
@@ -990,8 +990,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 667..680,
node_index: NodeIndex(None),
range: 667..680,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 85..91,
node_index: NodeIndex(None),
range: 85..91,
keys: [
Starred(
ExprStarred {
@@ -50,8 +50,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 90..90,
node_index: NodeIndex(None),
range: 90..90,
value: Name(
ExprName {
node_index: NodeIndex(None),
@@ -81,8 +81,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 115..124,
node_index: NodeIndex(None),
range: 115..124,
keys: [
Starred(
ExprStarred {
@@ -103,8 +103,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 122..123,
node_index: NodeIndex(None),
range: 122..123,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -135,8 +135,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 148..156,
node_index: NodeIndex(None),
range: 148..156,
keys: [
Starred(
ExprStarred {
@@ -157,8 +157,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 154..155,
node_index: NodeIndex(None),
range: 154..155,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -189,8 +189,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 180..195,
node_index: NodeIndex(None),
range: 180..195,
keys: [
Starred(
ExprStarred {
@@ -217,8 +217,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 185..185,
node_index: NodeIndex(None),
range: 185..185,
value: Name(
ExprName {
node_index: NodeIndex(None),
@@ -231,8 +231,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 193..194,
node_index: NodeIndex(None),
range: 193..194,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -279,8 +279,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 329..346,
node_index: NodeIndex(None),
range: 329..346,
keys: [
NoneLiteral(
ExprNoneLiteral {
@@ -292,8 +292,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 344..345,
node_index: NodeIndex(None),
range: 344..345,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -330,8 +330,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 370..397,
node_index: NodeIndex(None),
range: 370..397,
keys: [
NoneLiteral(
ExprNoneLiteral {
@@ -343,8 +343,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 395..396,
node_index: NodeIndex(None),
range: 395..396,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -381,8 +381,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 421..448,
node_index: NodeIndex(None),
range: 421..448,
keys: [
NoneLiteral(
ExprNoneLiteral {
@@ -394,8 +394,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 437..438,
node_index: NodeIndex(None),
range: 437..438,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -448,8 +448,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 488..504,
node_index: NodeIndex(None),
range: 488..504,
keys: [
Call(
ExprCall {
@@ -484,8 +484,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 502..503,
node_index: NodeIndex(None),
range: 502..503,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchStar(
PatternMatchStar {
range: 81..83,
node_index: NodeIndex(None),
range: 81..83,
name: None,
},
),
@@ -48,13 +48,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 107..114,
node_index: NodeIndex(None),
range: 107..114,
pattern: Some(
MatchStar(
PatternMatchStar {
range: 107..109,
node_index: NodeIndex(None),
range: 107..109,
name: None,
},
),
@@ -83,8 +83,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchStar(
PatternMatchStar {
range: 138..142,
node_index: NodeIndex(None),
range: 138..142,
name: Some(
Identifier {
id: Name("foo"),
@@ -109,13 +109,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 166..174,
node_index: NodeIndex(None),
range: 166..174,
patterns: [
MatchStar(
PatternMatchStar {
range: 166..170,
node_index: NodeIndex(None),
range: 166..170,
name: Some(
Identifier {
id: Name("foo"),
@@ -127,8 +127,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 173..174,
node_index: NodeIndex(None),
range: 173..174,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -158,13 +158,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 198..206,
node_index: NodeIndex(None),
range: 198..206,
patterns: [
MatchValue(
PatternMatchValue {
range: 198..199,
node_index: NodeIndex(None),
range: 198..199,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -178,8 +178,8 @@ Module(
),
MatchStar(
PatternMatchStar {
range: 202..206,
node_index: NodeIndex(None),
range: 202..206,
name: Some(
Identifier {
id: Name("foo"),
@@ -207,8 +207,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 230..237,
node_index: NodeIndex(None),
range: 230..237,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -223,8 +223,8 @@ Module(
patterns: [
MatchStar(
PatternMatchStar {
range: 234..236,
node_index: NodeIndex(None),
range: 234..236,
name: None,
},
),
@@ -248,8 +248,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 261..270,
node_index: NodeIndex(None),
range: 261..270,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -273,8 +273,8 @@ Module(
},
pattern: MatchStar(
PatternMatchStar {
range: 267..269,
node_index: NodeIndex(None),
range: 267..269,
name: None,
},
),
@@ -298,8 +298,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 294..298,
node_index: NodeIndex(None),
range: 294..298,
keys: [
Starred(
ExprStarred {
@@ -320,8 +320,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 297..297,
node_index: NodeIndex(None),
range: 297..297,
value: Name(
ExprName {
node_index: NodeIndex(None),
@@ -351,8 +351,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 322..329,
node_index: NodeIndex(None),
range: 322..329,
keys: [
Starred(
ExprStarred {
@@ -373,8 +373,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 327..328,
node_index: NodeIndex(None),
range: 327..328,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -405,8 +405,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 353..363,
node_index: NodeIndex(None),
range: 353..363,
keys: [
NoneLiteral(
ExprNoneLiteral {
@@ -418,8 +418,8 @@ Module(
patterns: [
MatchStar(
PatternMatchStar {
range: 360..362,
node_index: NodeIndex(None),
range: 360..362,
name: None,
},
),
@@ -442,8 +442,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 387..393,
node_index: NodeIndex(None),
range: 387..393,
value: BinOp(
ExprBinOp {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 98..100,
node_index: NodeIndex(None),
range: 98..100,
value: UnaryOp(
ExprUnaryOp {
node_index: NodeIndex(None),
@@ -63,13 +63,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 124..135,
node_index: NodeIndex(None),
range: 124..135,
patterns: [
MatchValue(
PatternMatchValue {
range: 124..125,
node_index: NodeIndex(None),
range: 124..125,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -83,8 +83,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 128..130,
node_index: NodeIndex(None),
range: 128..130,
value: UnaryOp(
ExprUnaryOp {
node_index: NodeIndex(None),
@@ -105,8 +105,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 133..135,
node_index: NodeIndex(None),
range: 133..135,
value: UnaryOp(
ExprUnaryOp {
node_index: NodeIndex(None),
@@ -143,13 +143,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 159..170,
node_index: NodeIndex(None),
range: 159..170,
patterns: [
MatchValue(
PatternMatchValue {
range: 160..161,
node_index: NodeIndex(None),
range: 160..161,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -163,8 +163,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 163..165,
node_index: NodeIndex(None),
range: 163..165,
value: UnaryOp(
ExprUnaryOp {
node_index: NodeIndex(None),
@@ -185,8 +185,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 167..169,
node_index: NodeIndex(None),
range: 167..169,
value: UnaryOp(
ExprUnaryOp {
node_index: NodeIndex(None),
@@ -223,8 +223,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 194..209,
node_index: NodeIndex(None),
range: 194..209,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -248,8 +248,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 200..202,
node_index: NodeIndex(None),
range: 200..202,
value: UnaryOp(
ExprUnaryOp {
node_index: NodeIndex(None),
@@ -279,8 +279,8 @@ Module(
},
pattern: MatchValue(
PatternMatchValue {
range: 206..208,
node_index: NodeIndex(None),
range: 206..208,
value: UnaryOp(
ExprUnaryOp {
node_index: NodeIndex(None),
@@ -319,8 +319,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 233..254,
node_index: NodeIndex(None),
range: 233..254,
keys: [
BooleanLiteral(
ExprBooleanLiteral {
@@ -340,8 +340,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 240..242,
node_index: NodeIndex(None),
range: 240..242,
value: UnaryOp(
ExprUnaryOp {
node_index: NodeIndex(None),
@@ -362,8 +362,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 251..253,
node_index: NodeIndex(None),
range: 251..253,
value: UnaryOp(
ExprUnaryOp {
node_index: NodeIndex(None),

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 51..58,
node_index: NodeIndex(None),
range: 51..58,
name: Identifier {
id: Name("T"),
range: 51..52,
@@ -80,8 +80,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 72..79,
node_index: NodeIndex(None),
range: 72..79,
name: Identifier {
id: Name("T"),
range: 72..73,
@@ -146,8 +146,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 96..103,
node_index: NodeIndex(None),
range: 96..103,
name: Identifier {
id: Name("T"),
range: 96..97,
@@ -210,8 +210,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 120..121,
node_index: NodeIndex(None),
range: 120..121,
name: Identifier {
id: Name("S"),
range: 120..121,
@@ -223,8 +223,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 123..130,
node_index: NodeIndex(None),
range: 123..130,
name: Identifier {
id: Name("T"),
range: 123..124,
@@ -245,8 +245,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 132..140,
node_index: NodeIndex(None),
range: 132..140,
name: Identifier {
id: Name("U"),
range: 132..133,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 7..14,
node_index: NodeIndex(None),
range: 7..14,
name: Identifier {
id: Name("T"),
range: 7..8,
@@ -88,8 +88,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 29..39,
node_index: NodeIndex(None),
range: 29..39,
name: Identifier {
id: Name("T"),
range: 29..30,
@@ -148,8 +148,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 54..69,
node_index: NodeIndex(None),
range: 54..69,
name: Identifier {
id: Name("T"),
range: 54..55,
@@ -206,8 +206,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 84..88,
node_index: NodeIndex(None),
range: 84..88,
name: Identifier {
id: Name("T"),
range: 84..85,
@@ -228,8 +228,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 92..95,
node_index: NodeIndex(None),
range: 92..95,
name: Identifier {
id: Name("int"),
range: 92..95,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 7..9,
node_index: NodeIndex(None),
range: 7..9,
name: Identifier {
id: Name("T"),
range: 7..8,
@@ -72,8 +72,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 25..28,
node_index: NodeIndex(None),
range: 25..28,
name: Identifier {
id: Name("T1"),
range: 25..27,
@@ -85,8 +85,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 31..33,
node_index: NodeIndex(None),
range: 31..33,
name: Identifier {
id: Name("T2"),
range: 31..33,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 7..10,
node_index: NodeIndex(None),
range: 7..10,
name: Identifier {
id: Name("T"),
range: 9..10,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 7..17,
node_index: NodeIndex(None),
range: 7..17,
name: Identifier {
id: Name("P"),
range: 9..10,
@@ -87,8 +87,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 32..45,
node_index: NodeIndex(None),
range: 32..45,
name: Identifier {
id: Name("P"),
range: 34..35,
@@ -146,8 +146,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 60..78,
node_index: NodeIndex(None),
range: 60..78,
name: Identifier {
id: Name("P"),
range: 62..63,
@@ -203,8 +203,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 93..100,
node_index: NodeIndex(None),
range: 93..100,
name: Identifier {
id: Name("P"),
range: 95..96,
@@ -224,8 +224,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 104..107,
node_index: NodeIndex(None),
range: 104..107,
name: Identifier {
id: Name("int"),
range: 104..107,
@@ -267,8 +267,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 122..132,
node_index: NodeIndex(None),
range: 122..132,
name: Identifier {
id: Name("P"),
range: 124..125,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 7..12,
node_index: NodeIndex(None),
range: 7..12,
name: Identifier {
id: Name("P"),
range: 9..10,
@@ -71,8 +71,8 @@ Module(
type_params: [
ParamSpec(
TypeParamParamSpec {
range: 27..32,
node_index: NodeIndex(None),
range: 27..32,
name: Identifier {
id: Name("P"),
range: 29..30,
@@ -83,8 +83,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 34..36,
node_index: NodeIndex(None),
range: 34..36,
name: Identifier {
id: Name("T2"),
range: 34..36,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 7..15,
node_index: NodeIndex(None),
range: 7..15,
name: Identifier {
id: Name("T"),
range: 7..8,
@@ -88,8 +88,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 30..41,
node_index: NodeIndex(None),
range: 30..41,
name: Identifier {
id: Name("T"),
range: 30..31,
@@ -148,8 +148,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 56..69,
node_index: NodeIndex(None),
range: 56..69,
name: Identifier {
id: Name("T"),
range: 56..57,
@@ -208,8 +208,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 84..100,
node_index: NodeIndex(None),
range: 84..100,
name: Identifier {
id: Name("T"),
range: 84..85,
@@ -266,8 +266,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 115..120,
node_index: NodeIndex(None),
range: 115..120,
name: Identifier {
id: Name("T"),
range: 115..116,
@@ -288,8 +288,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 124..127,
node_index: NodeIndex(None),
range: 124..127,
name: Identifier {
id: Name("int"),
range: 124..127,
@@ -331,8 +331,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 142..155,
node_index: NodeIndex(None),
range: 142..155,
name: Identifier {
id: Name("T"),
range: 142..143,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 7..10,
node_index: NodeIndex(None),
range: 7..10,
name: Identifier {
id: Name("T"),
range: 7..8,
@@ -72,8 +72,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 25..33,
node_index: NodeIndex(None),
range: 25..33,
name: Identifier {
id: Name("T"),
range: 25..26,
@@ -124,8 +124,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 48..52,
node_index: NodeIndex(None),
range: 48..52,
name: Identifier {
id: Name("T1"),
range: 48..50,
@@ -137,8 +137,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 54..56,
node_index: NodeIndex(None),
range: 54..56,
name: Identifier {
id: Name("T2"),
range: 54..56,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 7..9,
node_index: NodeIndex(None),
range: 7..9,
name: Identifier {
id: Name("T"),
range: 8..9,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 7..17,
node_index: NodeIndex(None),
range: 7..17,
name: Identifier {
id: Name("Ts"),
range: 8..10,
@@ -87,8 +87,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 32..49,
node_index: NodeIndex(None),
range: 32..49,
name: Identifier {
id: Name("Ts"),
range: 33..35,
@@ -162,8 +162,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 64..77,
node_index: NodeIndex(None),
range: 64..77,
name: Identifier {
id: Name("Ts"),
range: 65..67,
@@ -221,8 +221,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 92..110,
node_index: NodeIndex(None),
range: 92..110,
name: Identifier {
id: Name("Ts"),
range: 93..95,
@@ -278,8 +278,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 125..132,
node_index: NodeIndex(None),
range: 125..132,
name: Identifier {
id: Name("Ts"),
range: 126..128,
@@ -299,8 +299,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 136..139,
node_index: NodeIndex(None),
range: 136..139,
name: Identifier {
id: Name("int"),
range: 136..139,

View File

@@ -29,8 +29,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 7..12,
node_index: NodeIndex(None),
range: 7..12,
name: Identifier {
id: Name("Ts"),
range: 8..10,
@@ -71,8 +71,8 @@ Module(
type_params: [
TypeVarTuple(
TypeParamTypeVarTuple {
range: 27..32,
node_index: NodeIndex(None),
range: 27..32,
name: Identifier {
id: Name("Ts"),
range: 28..30,
@@ -83,8 +83,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 34..36,
node_index: NodeIndex(None),
range: 34..36,
name: Identifier {
id: Name("T2"),
range: 34..36,

View File

@@ -29,8 +29,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchClass(
PatternMatchClass {
range: 18..28,
node_index: NodeIndex(None),
range: 18..28,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -54,8 +54,8 @@ Module(
},
pattern: MatchAs(
PatternMatchAs {
range: 26..27,
node_index: NodeIndex(None),
range: 26..27,
pattern: None,
name: Some(
Identifier {

View File

@@ -27,8 +27,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 54..69,
node_index: NodeIndex(None),
range: 54..69,
name: Identifier {
id: Name("S"),
range: 54..55,
@@ -67,8 +67,8 @@ Module(
),
TypeVar(
TypeParamTypeVar {
range: 71..79,
node_index: NodeIndex(None),
range: 71..79,
name: Identifier {
id: Name("T"),
range: 71..72,
@@ -89,8 +89,8 @@ Module(
),
TypeVarTuple(
TypeParamTypeVarTuple {
range: 81..84,
node_index: NodeIndex(None),
range: 81..84,
name: Identifier {
id: Name("Ts"),
range: 82..84,
@@ -101,8 +101,8 @@ Module(
),
ParamSpec(
TypeParamParamSpec {
range: 86..89,
node_index: NodeIndex(None),
range: 86..89,
name: Identifier {
id: Name("P"),
range: 88..89,

View File

@@ -28,18 +28,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 18..27,
node_index: NodeIndex(None),
range: 18..27,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 18..21,
node_index: NodeIndex(None),
range: 18..21,
patterns: [
MatchAs(
PatternMatchAs {
range: 19..20,
node_index: NodeIndex(None),
range: 19..20,
pattern: None,
name: Some(
Identifier {
@@ -55,13 +55,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 24..27,
node_index: NodeIndex(None),
range: 24..27,
patterns: [
MatchAs(
PatternMatchAs {
range: 25..26,
node_index: NodeIndex(None),
range: 25..26,
pattern: None,
name: Some(
Identifier {
@@ -99,18 +99,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 42..57,
node_index: NodeIndex(None),
range: 42..57,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 42..48,
node_index: NodeIndex(None),
range: 42..48,
patterns: [
MatchAs(
PatternMatchAs {
range: 43..44,
node_index: NodeIndex(None),
range: 43..44,
pattern: None,
name: Some(
Identifier {
@@ -123,8 +123,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 46..47,
node_index: NodeIndex(None),
range: 46..47,
pattern: None,
name: Some(
Identifier {
@@ -140,13 +140,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 51..57,
node_index: NodeIndex(None),
range: 51..57,
patterns: [
MatchAs(
PatternMatchAs {
range: 52..53,
node_index: NodeIndex(None),
range: 52..53,
pattern: None,
name: Some(
Identifier {
@@ -159,8 +159,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 55..56,
node_index: NodeIndex(None),
range: 55..56,
pattern: None,
name: Some(
Identifier {
@@ -198,13 +198,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 72..84,
node_index: NodeIndex(None),
range: 72..84,
patterns: [
MatchAs(
PatternMatchAs {
range: 73..74,
node_index: NodeIndex(None),
range: 73..74,
pattern: None,
name: Some(
Identifier {
@@ -217,13 +217,13 @@ Module(
),
MatchOr(
PatternMatchOr {
range: 77..82,
node_index: NodeIndex(None),
range: 77..82,
patterns: [
MatchAs(
PatternMatchAs {
range: 77..78,
node_index: NodeIndex(None),
range: 77..78,
pattern: None,
name: Some(
Identifier {
@@ -236,8 +236,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 81..82,
node_index: NodeIndex(None),
range: 81..82,
pattern: None,
name: Some(
Identifier {
@@ -275,18 +275,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 99..114,
node_index: NodeIndex(None),
range: 99..114,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 99..105,
node_index: NodeIndex(None),
range: 99..105,
patterns: [
MatchAs(
PatternMatchAs {
range: 100..101,
node_index: NodeIndex(None),
range: 100..101,
pattern: None,
name: Some(
Identifier {
@@ -299,8 +299,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 103..104,
node_index: NodeIndex(None),
range: 103..104,
pattern: None,
name: None,
},
@@ -310,13 +310,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 108..114,
node_index: NodeIndex(None),
range: 108..114,
patterns: [
MatchAs(
PatternMatchAs {
range: 109..110,
node_index: NodeIndex(None),
range: 109..110,
pattern: None,
name: Some(
Identifier {
@@ -329,8 +329,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 112..113,
node_index: NodeIndex(None),
range: 112..113,
pattern: None,
name: None,
},
@@ -362,18 +362,18 @@ Module(
node_index: NodeIndex(None),
pattern: MatchOr(
PatternMatchOr {
range: 129..141,
node_index: NodeIndex(None),
range: 129..141,
patterns: [
MatchSequence(
PatternMatchSequence {
range: 129..132,
node_index: NodeIndex(None),
range: 129..132,
patterns: [
MatchAs(
PatternMatchAs {
range: 130..131,
node_index: NodeIndex(None),
range: 130..131,
pattern: None,
name: Some(
Identifier {
@@ -389,13 +389,13 @@ Module(
),
MatchSequence(
PatternMatchSequence {
range: 135..141,
node_index: NodeIndex(None),
range: 135..141,
patterns: [
MatchClass(
PatternMatchClass {
range: 136..140,
node_index: NodeIndex(None),
range: 136..140,
cls: Name(
ExprName {
node_index: NodeIndex(None),
@@ -410,8 +410,8 @@ Module(
patterns: [
MatchAs(
PatternMatchAs {
range: 138..139,
node_index: NodeIndex(None),
range: 138..139,
pattern: None,
name: Some(
Identifier {

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchMapping(
PatternMatchMapping {
range: 18..34,
node_index: NodeIndex(None),
range: 18..34,
keys: [
Attribute(
ExprAttribute {
@@ -75,8 +75,8 @@ Module(
patterns: [
MatchValue(
PatternMatchValue {
range: 24..25,
node_index: NodeIndex(None),
range: 24..25,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -90,8 +90,8 @@ Module(
),
MatchValue(
PatternMatchValue {
range: 32..33,
node_index: NodeIndex(None),
range: 32..33,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -1077,8 +1077,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 274..279,
node_index: NodeIndex(None),
range: 274..279,
value: StringLiteral(
ExprStringLiteral {
node_index: NodeIndex(None),
@@ -1117,8 +1117,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 303..331,
node_index: NodeIndex(None),
range: 303..331,
value: StringLiteral(
ExprStringLiteral {
node_index: NodeIndex(None),

View File

@@ -1053,8 +1053,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 276..281,
node_index: NodeIndex(None),
range: 276..281,
value: StringLiteral(
ExprStringLiteral {
node_index: NodeIndex(None),
@@ -1093,8 +1093,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 305..333,
node_index: NodeIndex(None),
range: 305..333,
value: StringLiteral(
ExprStringLiteral {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
type_params: [
TypeVar(
TypeParamTypeVar {
range: 52..53,
node_index: NodeIndex(None),
range: 52..53,
name: Identifier {
id: Name("T"),
range: 52..53,

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 18..19,
node_index: NodeIndex(None),
range: 18..19,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -62,8 +62,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 34..37,
node_index: NodeIndex(None),
range: 34..37,
pattern: None,
name: Some(
Identifier {
@@ -111,8 +111,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 61..62,
node_index: NodeIndex(None),
range: 61..62,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),
@@ -145,8 +145,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 77..78,
node_index: NodeIndex(None),
range: 77..78,
pattern: None,
name: None,
},
@@ -188,8 +188,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 102..105,
node_index: NodeIndex(None),
range: 102..105,
pattern: None,
name: Some(
Identifier {
@@ -229,8 +229,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 169..170,
node_index: NodeIndex(None),
range: 169..170,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -29,8 +29,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 64..65,
node_index: NodeIndex(None),
range: 64..65,
value: NumberLiteral(
ExprNumberLiteral {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 20..27,
node_index: NodeIndex(None),
range: 20..27,
pattern: None,
name: Some(
Identifier {
@@ -77,8 +77,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 53..54,
node_index: NodeIndex(None),
range: 53..54,
pattern: None,
name: None,
},

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 20..24,
node_index: NodeIndex(None),
range: 20..24,
pattern: None,
name: Some(
Identifier {
@@ -77,8 +77,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 50..55,
node_index: NodeIndex(None),
range: 50..55,
pattern: None,
name: Some(
Identifier {
@@ -126,8 +126,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 81..85,
node_index: NodeIndex(None),
range: 81..85,
pattern: None,
name: Some(
Identifier {

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 20..29,
node_index: NodeIndex(None),
range: 20..29,
value: Attribute(
ExprAttribute {
node_index: NodeIndex(None),
@@ -73,8 +73,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 44..52,
node_index: NodeIndex(None),
range: 44..52,
value: Attribute(
ExprAttribute {
node_index: NodeIndex(None),
@@ -118,8 +118,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 67..75,
node_index: NodeIndex(None),
range: 67..75,
value: Attribute(
ExprAttribute {
node_index: NodeIndex(None),
@@ -163,8 +163,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchValue(
PatternMatchValue {
range: 90..125,
node_index: NodeIndex(None),
range: 90..125,
value: Attribute(
ExprAttribute {
node_index: NodeIndex(None),

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 20..21,
node_index: NodeIndex(None),
range: 20..21,
pattern: None,
name: None,
},
@@ -72,8 +72,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 45..46,
node_index: NodeIndex(None),
range: 45..46,
pattern: None,
name: None,
},
@@ -116,8 +116,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 72..73,
node_index: NodeIndex(None),
range: 72..73,
pattern: None,
name: None,
},
@@ -161,8 +161,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 98..99,
node_index: NodeIndex(None),
range: 98..99,
pattern: None,
name: None,
},
@@ -217,8 +217,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 127..128,
node_index: NodeIndex(None),
range: 127..128,
pattern: None,
name: None,
},
@@ -300,8 +300,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 161..162,
node_index: NodeIndex(None),
range: 161..162,
pattern: None,
name: None,
},
@@ -361,8 +361,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 191..192,
node_index: NodeIndex(None),
range: 191..192,
pattern: None,
name: None,
},
@@ -411,8 +411,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 219..220,
node_index: NodeIndex(None),
range: 219..220,
pattern: None,
name: None,
},
@@ -452,8 +452,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 246..247,
node_index: NodeIndex(None),
range: 246..247,
pattern: None,
name: None,
},
@@ -502,8 +502,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 277..278,
node_index: NodeIndex(None),
range: 277..278,
pattern: None,
name: None,
},
@@ -563,8 +563,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 312..313,
node_index: NodeIndex(None),
range: 312..313,
pattern: None,
name: None,
},
@@ -639,8 +639,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 351..352,
node_index: NodeIndex(None),
range: 351..352,
pattern: None,
name: None,
},

View File

@@ -28,8 +28,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 22..23,
node_index: NodeIndex(None),
range: 22..23,
pattern: None,
name: None,
},
@@ -71,8 +71,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 50..51,
node_index: NodeIndex(None),
range: 50..51,
pattern: None,
name: None,
},
@@ -114,8 +114,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 78..79,
node_index: NodeIndex(None),
range: 78..79,
pattern: None,
name: None,
},
@@ -155,8 +155,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 106..107,
node_index: NodeIndex(None),
range: 106..107,
pattern: None,
name: None,
},
@@ -197,8 +197,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 134..135,
node_index: NodeIndex(None),
range: 134..135,
pattern: None,
name: None,
},
@@ -239,8 +239,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 163..164,
node_index: NodeIndex(None),
range: 163..164,
pattern: None,
name: None,
},

View File

@@ -93,8 +93,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 61..62,
node_index: NodeIndex(None),
range: 61..62,
pattern: None,
name: None,
},
@@ -195,8 +195,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 127..128,
node_index: NodeIndex(None),
range: 127..128,
pattern: None,
name: None,
},
@@ -303,8 +303,8 @@ Module(
node_index: NodeIndex(None),
pattern: MatchAs(
PatternMatchAs {
range: 218..219,
node_index: NodeIndex(None),
range: 218..219,
pattern: None,
name: None,
},

View File

@@ -28,13 +28,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 24..30,
node_index: NodeIndex(None),
range: 24..30,
patterns: [
MatchAs(
PatternMatchAs {
range: 25..26,
node_index: NodeIndex(None),
range: 25..26,
pattern: None,
name: Some(
Identifier {
@@ -47,8 +47,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 28..29,
node_index: NodeIndex(None),
range: 28..29,
pattern: None,
name: Some(
Identifier {
@@ -83,13 +83,13 @@ Module(
node_index: NodeIndex(None),
pattern: MatchSequence(
PatternMatchSequence {
range: 45..51,
node_index: NodeIndex(None),
range: 45..51,
patterns: [
MatchAs(
PatternMatchAs {
range: 46..47,
node_index: NodeIndex(None),
range: 46..47,
pattern: None,
name: Some(
Identifier {
@@ -102,8 +102,8 @@ Module(
),
MatchAs(
PatternMatchAs {
range: 49..50,
node_index: NodeIndex(None),
range: 49..50,
pattern: None,
name: Some(
Identifier {

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