Skip to content

Commit a4c2d1d

Browse files
committed
Merge branch 'main' into dcreager/infer-function-calls
* main: (31 commits) [red-knot] Add some knowledge of `__all__` to `*`-import machinery (#17373) Update taiki-e/install-action digest to be7c31b (#17379) Update Rust crate mimalloc to v0.1.46 (#17382) Update PyO3/maturin-action action to v1.49.1 (#17384) Update Rust crate anyhow to v1.0.98 (#17380) dependencies: switch from `chrono` to `jiff` Update Rust crate bstr to v1.12.0 (#17385) [red-knot] Further optimize `*`-import visibility constraints (#17375) [red-knot] Minor 'member_lookup_with_policy' fix (#17407) [red-knot] Initial support for `dataclass`es (#17353) Sync vendored typeshed stubs (#17402) [red-knot] improve function/bound method type display (#17294) [red-knot] Move relation methods from `CallableType` to `Signature` (#17365) [syntax-errors] `await` outside async functions (#17363) [red-knot] optimize is_subtype_of for literals (#17394) [red-knot] add a large-union-of-string-literals benchmark (#17393) Update pre-commit dependencies (#17383) [red-knot] mypy_primer: Fail job on panic or internal errors (#17389) [red-knot] Document limitations of diagnostics-silencing in unreachable code (#17387) [red-knot] detect unreachable attribute assignments (#16852) ...
2 parents d3067b0 + 312a487 commit a4c2d1d

File tree

223 files changed

+4676
-4804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+4676
-4804
lines changed

.github/workflows/build-binaries.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: "Prep README.md"
5050
run: python scripts/transform_readme.py --target pypi
5151
- name: "Build sdist"
52-
uses: PyO3/maturin-action@44479ae1b6b1a57f561e03add8832e62c185eb17 # v1.48.1
52+
uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1
5353
with:
5454
command: sdist
5555
args: --out dist
@@ -79,7 +79,7 @@ jobs:
7979
- name: "Prep README.md"
8080
run: python scripts/transform_readme.py --target pypi
8181
- name: "Build wheels - x86_64"
82-
uses: PyO3/maturin-action@44479ae1b6b1a57f561e03add8832e62c185eb17 # v1.48.1
82+
uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1
8383
with:
8484
target: x86_64
8585
args: --release --locked --out dist
@@ -121,7 +121,7 @@ jobs:
121121
- name: "Prep README.md"
122122
run: python scripts/transform_readme.py --target pypi
123123
- name: "Build wheels - aarch64"
124-
uses: PyO3/maturin-action@44479ae1b6b1a57f561e03add8832e62c185eb17 # v1.48.1
124+
uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1
125125
with:
126126
target: aarch64
127127
args: --release --locked --out dist
@@ -177,7 +177,7 @@ jobs:
177177
- name: "Prep README.md"
178178
run: python scripts/transform_readme.py --target pypi
179179
- name: "Build wheels"
180-
uses: PyO3/maturin-action@44479ae1b6b1a57f561e03add8832e62c185eb17 # v1.48.1
180+
uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1
181181
with:
182182
target: ${{ matrix.platform.target }}
183183
args: --release --locked --out dist
@@ -230,7 +230,7 @@ jobs:
230230
- name: "Prep README.md"
231231
run: python scripts/transform_readme.py --target pypi
232232
- name: "Build wheels"
233-
uses: PyO3/maturin-action@44479ae1b6b1a57f561e03add8832e62c185eb17 # v1.48.1
233+
uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1
234234
with:
235235
target: ${{ matrix.target }}
236236
manylinux: auto
@@ -304,7 +304,7 @@ jobs:
304304
- name: "Prep README.md"
305305
run: python scripts/transform_readme.py --target pypi
306306
- name: "Build wheels"
307-
uses: PyO3/maturin-action@44479ae1b6b1a57f561e03add8832e62c185eb17 # v1.48.1
307+
uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1
308308
with:
309309
target: ${{ matrix.platform.target }}
310310
manylinux: auto
@@ -370,7 +370,7 @@ jobs:
370370
- name: "Prep README.md"
371371
run: python scripts/transform_readme.py --target pypi
372372
- name: "Build wheels"
373-
uses: PyO3/maturin-action@44479ae1b6b1a57f561e03add8832e62c185eb17 # v1.48.1
373+
uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1
374374
with:
375375
target: ${{ matrix.target }}
376376
manylinux: musllinux_1_2
@@ -435,7 +435,7 @@ jobs:
435435
- name: "Prep README.md"
436436
run: python scripts/transform_readme.py --target pypi
437437
- name: "Build wheels"
438-
uses: PyO3/maturin-action@44479ae1b6b1a57f561e03add8832e62c185eb17 # v1.48.1
438+
uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1
439439
with:
440440
target: ${{ matrix.platform.target }}
441441
manylinux: musllinux_1_2

.github/workflows/ci.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ jobs:
239239
- name: "Install mold"
240240
uses: rui314/setup-mold@v1
241241
- name: "Install cargo nextest"
242-
uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc # v2
242+
uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2
243243
with:
244244
tool: cargo-nextest
245245
- name: "Install cargo insta"
246-
uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc # v2
246+
uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2
247247
with:
248248
tool: cargo-insta
249249
- name: Red-knot mdtests (GitHub annotations)
@@ -293,11 +293,11 @@ jobs:
293293
- name: "Install mold"
294294
uses: rui314/setup-mold@v1
295295
- name: "Install cargo nextest"
296-
uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc # v2
296+
uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2
297297
with:
298298
tool: cargo-nextest
299299
- name: "Install cargo insta"
300-
uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc # v2
300+
uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2
301301
with:
302302
tool: cargo-insta
303303
- name: "Run tests"
@@ -320,7 +320,7 @@ jobs:
320320
- name: "Install Rust toolchain"
321321
run: rustup show
322322
- name: "Install cargo nextest"
323-
uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc # v2
323+
uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2
324324
with:
325325
tool: cargo-nextest
326326
- name: "Run tests"
@@ -403,11 +403,11 @@ jobs:
403403
- name: "Install mold"
404404
uses: rui314/setup-mold@v1
405405
- name: "Install cargo nextest"
406-
uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc # v2
406+
uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2
407407
with:
408408
tool: cargo-nextest
409409
- name: "Install cargo insta"
410-
uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc # v2
410+
uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2
411411
with:
412412
tool: cargo-insta
413413
- name: "Run tests"
@@ -662,7 +662,7 @@ jobs:
662662
- name: "Prep README.md"
663663
run: python scripts/transform_readme.py --target pypi
664664
- name: "Build wheels"
665-
uses: PyO3/maturin-action@44479ae1b6b1a57f561e03add8832e62c185eb17 # v1.48.1
665+
uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1
666666
with:
667667
args: --out dist
668668
- name: "Test wheel"
@@ -857,7 +857,7 @@ jobs:
857857
run: rustup show
858858

859859
- name: "Install codspeed"
860-
uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc # v2
860+
uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2
861861
with:
862862
tool: cargo-codspeed
863863

.github/workflows/mypy_primer.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Install mypy_primer
4747
run: |
48-
uv tool install "git+https://github.com/astral-sh/mypy_primer.git@add-red-knot-support-v4"
48+
uv tool install "git+https://github.com/astral-sh/mypy_primer.git@add-red-knot-support-v5"
4949
5050
- name: Run mypy_primer
5151
shell: bash

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ repos:
7979
pass_filenames: false # This makes it a lot faster
8080

8181
- repo: https://github.com/astral-sh/ruff-pre-commit
82-
rev: v0.11.4
82+
rev: v0.11.5
8383
hooks:
8484
- id: ruff-format
8585
- id: ruff
@@ -102,7 +102,7 @@ repos:
102102
- id: zizmor
103103

104104
- repo: https://github.com/python-jsonschema/check-jsonschema
105-
rev: 0.32.1
105+
rev: 0.33.0
106106
hooks:
107107
- id: check-github-workflows
108108

Cargo.lock

+28-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ bitflags = { version = "2.5.0" }
5555
bstr = { version = "1.9.1" }
5656
cachedir = { version = "0.3.1" }
5757
camino = { version = "1.1.7" }
58-
chrono = { version = "0.4.35", default-features = false, features = ["clock"] }
5958
clap = { version = "4.5.3", features = ["derive"] }
6059
clap_complete_command = { version = "0.6.0" }
6160
clearscreen = { version = "4.0.0" }
@@ -95,6 +94,7 @@ insta-cmd = { version = "0.6.0" }
9594
is-macro = { version = "0.3.5" }
9695
is-wsl = { version = "0.4.0" }
9796
itertools = { version = "0.14.0" }
97+
jiff = { version = "0.2.0" }
9898
js-sys = { version = "0.3.69" }
9999
jod-thread = { version = "0.1.2" }
100100
libc = { version = "0.2.153" }

crates/red_knot/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ ruff_python_ast = { workspace = true }
2020

2121
anyhow = { workspace = true }
2222
argfile = { workspace = true }
23-
chrono = { workspace = true }
2423
clap = { workspace = true, features = ["wrap_help"] }
2524
colored = { workspace = true }
2625
countme = { workspace = true, features = ["enable"] }
2726
crossbeam = { workspace = true }
2827
ctrlc = { version = "3.4.4" }
28+
jiff = { workspace = true }
2929
rayon = { workspace = true }
3030
salsa = { workspace = true }
3131
tracing = { workspace = true, features = ["release_max_level_debug"] }

crates/red_knot/src/logging.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,16 @@ where
190190
let ansi = writer.has_ansi_escapes();
191191

192192
if self.display_timestamp {
193-
let timestamp = chrono::Local::now()
194-
.format("%Y-%m-%d %H:%M:%S.%f")
193+
let timestamp = jiff::Zoned::now()
194+
.strftime("%Y-%m-%d %H:%M:%S.%f")
195195
.to_string();
196196
if ansi {
197197
write!(writer, "{} ", timestamp.dimmed())?;
198198
} else {
199199
write!(
200200
writer,
201201
"{} ",
202-
chrono::Local::now().format("%Y-%m-%d %H:%M:%S.%f")
202+
jiff::Zoned::now().strftime("%Y-%m-%d %H:%M:%S.%f")
203203
)?;
204204
}
205205
}

0 commit comments

Comments
 (0)