Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions extra_tests/snippets/builtin_type.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import types
from testutils import assert_raises

from testutils import assert_raises

# Spec: https://docs.python.org/2/library/types.html
print(None)
Expand Down Expand Up @@ -111,8 +111,6 @@ class D:
with assert_raises(TypeError):
del int.__qualname__

from testutils import assert_raises
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also run ruff check --select I in our CI 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about just put it in auto-format and add some files to blocklist


import platform

if platform.python_implementation() == "RustPython":
Expand Down Expand Up @@ -607,3 +605,24 @@ class A(type):


assert "__dict__" not in A.__dict__


# regression tests for: https://github.com/RustPython/RustPython/issues/4505


def foo():
def inner():
pass


assert foo.__code__.co_names == ()

stmts = """
import blah

def foo():
pass
"""

code = compile(stmts, "<test>", "exec")
assert code.co_names == ("blah", "foo")
Loading