Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ repos:
- id: black
name: Run Black on Tools/build/check_warnings.py
files: ^Tools/build/check_warnings.py
language_version: python3.12
language_version: python3
args: [--line-length=79]
- id: black
name: Run Black on Tools/jit/
files: ^Tools/jit/
language_version: python3.12
language_version: python3

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
Expand Down
6 changes: 6 additions & 0 deletions Lib/test/test_ctypes/test_struct_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ def __init_subclass__(cls, **kwargs):
'ctypes state is not initialized'):
class Subclass(BrokenStructure): ...

def test_gh126937(self):
class X(self.cls):
_fields_ = [('char', c_char),]
class Y(self.cls):
_fields_ = [('largeField', X * (2 ** 32))]

# __set__ and __get__ should raise a TypeError in case their self
# argument is not a ctype instance.
def test___set__(self):
Expand Down