From 436b22bf8962554c203dbcfb84b4996c25c00339 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 10 Mar 2024 12:21:03 +0800 Subject: [PATCH] Reformat according to black 24 --- src/binding_class.py | 6 ++---- src/binding_enum.py | 6 ++---- src/binding_func.py | 6 ++---- src/binding_generic_specializations.py | 1 + src/clang/cindex.pyi | 1 + src/lint.py | 1 + 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/binding_class.py b/src/binding_class.py index 229c449..aa3e155 100644 --- a/src/binding_class.py +++ b/src/binding_class.py @@ -54,8 +54,7 @@ def __init__( typedef: str, ignore_fields: Optional[Set[str]] = ..., rename_fields: Optional[Dict[str, str]] = ..., - ): - ... + ): ... @overload def __init__( @@ -66,8 +65,7 @@ def __init__( struct: str, ignore_fields: Optional[Set[str]] = ..., rename_fields: Optional[Dict[str, str]] = ..., - ): - ... + ): ... def __init__( self, diff --git a/src/binding_enum.py b/src/binding_enum.py index 65a5f69..15c4741 100644 --- a/src/binding_enum.py +++ b/src/binding_enum.py @@ -46,12 +46,10 @@ class MacroEnum: defines: OrderedDict[str, str] @overload - def __init__(self, header: Header, *defines: str): - ... + def __init__(self, header: Header, *defines: str): ... @overload - def __init__(self, header: Header, *, prefix: str): - ... + def __init__(self, header: Header, *, prefix: str): ... def __init__( self, diff --git a/src/binding_func.py b/src/binding_func.py index f09e409..a2dc0e2 100644 --- a/src/binding_func.py +++ b/src/binding_func.py @@ -28,8 +28,7 @@ def __init__( *, default_args: Optional[Dict[str, str]] = ..., typemaps: Optional[List[Typemap]] = ..., - ): - ... + ): ... @overload def __init__( @@ -39,8 +38,7 @@ def __init__( cfunc: "CFunc", default_args: Optional[Dict[str, str]] = ..., typemaps: Optional[List[Typemap]] = ..., - ): - ... + ): ... def __init__( self, diff --git a/src/binding_generic_specializations.py b/src/binding_generic_specializations.py index 881a7c9..eebf7d1 100644 --- a/src/binding_generic_specializations.py +++ b/src/binding_generic_specializations.py @@ -2,6 +2,7 @@ SPDX-FileCopyrightText: 2022 wingdeans SPDX-License-Identifier: LGPL-3.0-only """ + from typing import List, Dict, TYPE_CHECKING from clang.cindex import Cursor, CursorKind diff --git a/src/clang/cindex.pyi b/src/clang/cindex.pyi index 50e7525..7e7eb54 100644 --- a/src/clang/cindex.pyi +++ b/src/clang/cindex.pyi @@ -86,6 +86,7 @@ class Type: class SourceLocation: class File: name: str + file: File line: int column: int diff --git a/src/lint.py b/src/lint.py index 73c02ee..541cbaf 100644 --- a/src/lint.py +++ b/src/lint.py @@ -23,6 +23,7 @@ by defining the RZ_BINDINGS preprocessor flag, which sets the annotations to expand to __attribute__((annotate)), which can be picked up by libclang. """ + from typing import List, Dict, Set, TypedDict, Optional, cast import os