diff --git a/blueprintcompiler/language/__init__.py b/blueprintcompiler/language/__init__.py index 39d8336..23262c9 100644 --- a/blueprintcompiler/language/__init__.py +++ b/blueprintcompiler/language/__init__.py @@ -1,33 +1,20 @@ -from .adw_breakpoint import ( - AdwBreakpointCondition, - AdwBreakpointSetter, - AdwBreakpointSetters, -) +from .adw_breakpoint import (AdwBreakpointCondition, AdwBreakpointSetter, + AdwBreakpointSetters) from .adw_message_dialog import ExtAdwMessageDialog from .attributes import BaseAttribute from .binding import Binding from .common import * from .contexts import ScopeCtx, ValueTypeCtx -from .expression import ( - CastExpr, - ClosureArg, - ClosureExpr, - ExprBase, - Expression, - LiteralExpr, - LookupOp, -) +from .expression import (CastExpr, ClosureArg, ClosureExpr, ExprBase, + Expression, LiteralExpr, LookupOp) from .gobject_object import Object, ObjectContent from .gobject_property import Property from .gobject_signal import Signal from .gtk_a11y import ExtAccessibility from .gtk_combo_box_text import ExtComboBoxItems -from .gtk_file_filter import ( - Filters, - ext_file_filter_mime_types, - ext_file_filter_patterns, - ext_file_filter_suffixes, -) +from .gtk_file_filter import (Filters, ext_file_filter_mime_types, + ext_file_filter_patterns, + ext_file_filter_suffixes) from .gtk_layout import ExtLayout from .gtk_list_item_factory import ExtListItemFactory from .gtk_menu import Menu, MenuAttribute, menu @@ -40,19 +27,9 @@ from .gtkbuilder_template import Template from .imports import GtkDirective, Import from .types import ClassName from .ui import UI -from .values import ( - Flag, - Flags, - IdentLiteral, - Literal, - NumberLiteral, - ObjectValue, - QuotedLiteral, - StringValue, - Translated, - TypeLiteral, - Value, -) +from .values import (Flag, Flags, IdentLiteral, Literal, NumberLiteral, + ObjectValue, QuotedLiteral, StringValue, Translated, + TypeLiteral, Value) OBJECT_CONTENT_HOOKS.children = [ Signal, diff --git a/blueprintcompiler/language/common.py b/blueprintcompiler/language/common.py index 8a6ce9b..66d88d3 100644 --- a/blueprintcompiler/language/common.py +++ b/blueprintcompiler/language/common.py @@ -22,39 +22,15 @@ from .. import decompiler as decompile from .. import gir from ..ast_utils import AstNode, context, docs, validate from ..completions_utils import * -from ..decompiler import ( - DecompileCtx, - decompile_translatable, - decompiler, - escape_quote, - truthy, -) -from ..errors import ( - CodeAction, - CompileError, - CompileWarning, - DeprecatedWarning, - MultipleErrors, - UpgradeWarning, -) -from ..gir import ( - BoolType, - Enumeration, - ExternType, - FloatType, - GirType, - IntType, - StringType, -) -from ..lsp_utils import ( - Completion, - CompletionItemKind, - DocumentSymbol, - LocationLink, - SemanticToken, - SemanticTokenType, - SymbolKind, -) +from ..decompiler import (DecompileCtx, decompile_translatable, decompiler, + escape_quote, truthy) +from ..errors import (CodeAction, CompileError, CompileWarning, + DeprecatedWarning, MultipleErrors, UpgradeWarning) +from ..gir import (BoolType, Enumeration, ExternType, FloatType, GirType, + IntType, StringType) +from ..lsp_utils import (Completion, CompletionItemKind, DocumentSymbol, + LocationLink, SemanticToken, SemanticTokenType, + SymbolKind) from ..parse_tree import * OBJECT_CONTENT_HOOKS = AnyOf() diff --git a/blueprintcompiler/lsp.py b/blueprintcompiler/lsp.py index 42a0fbf..6c976a8 100644 --- a/blueprintcompiler/lsp.py +++ b/blueprintcompiler/lsp.py @@ -22,13 +22,13 @@ import json import sys import traceback import typing as T +from difflib import SequenceMatcher from . import decompiler, parser, tokenizer, utils, xml_reader from .ast_utils import AstNode from .completions import complete from .errors import CompileError, MultipleErrors from .formatter import Format -from difflib import SequenceMatcher from .lsp_utils import * from .outputs.xml import XmlOutput from .tokenizer import Token diff --git a/blueprintcompiler/parse_tree.py b/blueprintcompiler/parse_tree.py index 8f3ef31..66b14f7 100644 --- a/blueprintcompiler/parse_tree.py +++ b/blueprintcompiler/parse_tree.py @@ -23,13 +23,8 @@ import typing as T from enum import Enum from .ast_utils import AstNode -from .errors import ( - CompileError, - CompilerBugError, - CompileWarning, - UnexpectedTokenError, - assert_true, -) +from .errors import (CompileError, CompilerBugError, CompileWarning, + UnexpectedTokenError, assert_true) from .tokenizer import Range, Token, TokenType SKIP_TOKENS = [TokenType.COMMENT, TokenType.WHITESPACE] diff --git a/tests/fuzz.py b/tests/fuzz.py index 81a9058..83d5270 100644 --- a/tests/fuzz.py +++ b/tests/fuzz.py @@ -9,12 +9,8 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) from blueprintcompiler import decompiler, gir, parser, tokenizer, utils from blueprintcompiler.completions import complete -from blueprintcompiler.errors import ( - CompileError, - CompilerBugError, - MultipleErrors, - PrintableError, -) +from blueprintcompiler.errors import (CompileError, CompilerBugError, + MultipleErrors, PrintableError) from blueprintcompiler.tokenizer import Token, TokenType, tokenize diff --git a/tests/test_samples.py b/tests/test_samples.py index 226e762..96e3b6e 100644 --- a/tests/test_samples.py +++ b/tests/test_samples.py @@ -29,12 +29,8 @@ from gi.repository import Gtk from blueprintcompiler import decompiler, parser, tokenizer, utils from blueprintcompiler.completions import complete -from blueprintcompiler.errors import ( - CompileError, - DeprecatedWarning, - MultipleErrors, - PrintableError, -) +from blueprintcompiler.errors import (CompileError, DeprecatedWarning, + MultipleErrors, PrintableError) from blueprintcompiler.lsp import LanguageServer from blueprintcompiler.outputs.xml import XmlOutput from blueprintcompiler.tokenizer import Token, TokenType, tokenize