Skip to content

Commit 85da7b6

Browse files
authored
Merge branch 'RustPython:main' into main
2 parents a2c87c5 + d11d5c6 commit 85da7b6

File tree

141 files changed

+4101
-2778
lines changed

Some content is hidden

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

141 files changed

+4101
-2778
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,10 @@ jobs:
327327
run: python -m pip install ruff==0.11.8
328328
- name: Ensure docs generate no warnings
329329
run: cargo doc
330-
- name: run python lint
331-
run: ruff check
330+
- name: run ruff check
331+
run: ruff check --diff
332+
- name: run ruff format
333+
run: ruff format --check
332334
- name: install prettier
333335
run: yarn global add prettier && echo "$(yarn global bin)" >>$GITHUB_PATH
334336
- name: check wasm code with prettier
@@ -338,7 +340,7 @@ jobs:
338340
- name: install extra dictionaries
339341
run: npm install @cspell/dict-en_us @cspell/dict-cpp @cspell/dict-python @cspell/dict-rust @cspell/dict-win32 @cspell/dict-shell
340342
- name: spell checker
341-
uses: streetsidesoftware/cspell-action@v6
343+
uses: streetsidesoftware/cspell-action@v7
342344
with:
343345
files: '**/*.rs'
344346
incremental_files_only: true

Cargo.lock

Lines changed: 43 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/atexit_example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import atexit
22
import sys
33

4+
45
def myexit():
56
sys.exit(2)
67

8+
79
atexit.register(myexit)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
from rust_py_module import RustStruct, rust_function
22

3+
34
class PythonPerson:
45
def __init__(self, name):
56
self.name = name
67

8+
79
def python_callback():
810
python_person = PythonPerson("Peter Python")
911
rust_object = rust_function(42, "This is a python string", python_person)
1012
print("Printing member 'numbers' from rust struct: ", rust_object.numbers)
1113
rust_object.print_in_rust_from_python()
1214

15+
1316
def take_string(string):
1417
print("Calling python function from rust with string: " + string)

examples/freeze/freeze.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
import time
22

33
print("Hello world!!!", time.time())
4-

extra_tests/benchmarks/perf_fib.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ def fib(n):
22
a = 1
33
b = 1
44
for _ in range(n - 1):
5-
temp = b
6-
b = a + b
7-
a = temp
5+
temp = b
6+
b = a + b
7+
a = temp
88

99
return b
1010

11+
1112
print(fib(1))
1213
print(fib(2))
1314
print(fib(3))
1415
print(fib(4))
15-
print(fib(5))
16+
print(fib(5))

0 commit comments

Comments
 (0)