Remove unused imports
Signed-off-by: Dan Yeaw <dan@yeaw.me>
This commit is contained in:
parent
0c5310374e
commit
485c93bbc7
4
.flake8
4
.flake8
@ -1,7 +1,7 @@
|
||||
[flake8]
|
||||
ignore = E203, E266, E501, W503, F403, F401
|
||||
ignore = E203, E266, E501, W503, F403
|
||||
max-line-length = 88
|
||||
max-complexity = 18
|
||||
select = B,C,E,F,W,T4,B9
|
||||
exclude = .venv, dist
|
||||
exclude = .venv, dist, __init__.py, conftest.py, sysml.py, uml.py, coremodel.py, diagramitems.py
|
||||
show-source = True
|
@ -8,8 +8,6 @@ from gaphor.diagram.presentation import (
|
||||
from gaphor.diagram.shapes import (
|
||||
Box,
|
||||
EditableText,
|
||||
FontStyle,
|
||||
FontWeight,
|
||||
Text,
|
||||
TextAlign,
|
||||
VerticalAlign,
|
||||
@ -17,6 +15,7 @@ from gaphor.diagram.shapes import (
|
||||
draw_top_separator,
|
||||
)
|
||||
from gaphor.diagram.support import represents
|
||||
from gaphor.diagram.text import FontStyle, FontWeight
|
||||
from gaphor.SysML.sysml import Block
|
||||
from gaphor.UML.classes.klass import (
|
||||
attribute_watches,
|
||||
|
@ -1,6 +1,6 @@
|
||||
from gaphas.connector import Handle, Port
|
||||
|
||||
from gaphor.diagram.connectors import BaseConnector, Connector
|
||||
from gaphor.diagram.connectors import Connector
|
||||
from gaphor.SysML import sysml
|
||||
from gaphor.SysML.blocks.block import BlockItem
|
||||
from gaphor.SysML.blocks.proxyport import ProxyPortItem
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ast
|
||||
from typing import Optional
|
||||
|
||||
from gaphas.connector import Handle, LinePort
|
||||
from gaphas.connector import Handle
|
||||
from gaphas.geometry import Rectangle, distance_rectangle_point
|
||||
from gaphas.item import Item
|
||||
|
||||
|
@ -4,7 +4,6 @@ SysML related assets.
|
||||
"""
|
||||
|
||||
import gaphor.SysML.diagramitems as diagramitems
|
||||
import gaphor.SysML.propertypages
|
||||
import gaphor.SysML.sysml as sysml
|
||||
from gaphor.abc import ModelingLanguage
|
||||
from gaphor.core import gettext
|
||||
|
@ -10,7 +10,6 @@ from gaphor.SysML.requirements.relationships import (
|
||||
VerifyItem,
|
||||
)
|
||||
from gaphor.SysML.sysml import (
|
||||
Block,
|
||||
DeriveReqt,
|
||||
DirectedRelationshipPropertyPath,
|
||||
Refine,
|
||||
|
@ -7,8 +7,6 @@ from gaphor.diagram.presentation import (
|
||||
from gaphor.diagram.shapes import (
|
||||
Box,
|
||||
EditableText,
|
||||
FontStyle,
|
||||
FontWeight,
|
||||
Text,
|
||||
TextAlign,
|
||||
VerticalAlign,
|
||||
@ -16,6 +14,7 @@ from gaphor.diagram.shapes import (
|
||||
draw_top_separator,
|
||||
)
|
||||
from gaphor.diagram.support import represents
|
||||
from gaphor.diagram.text import FontStyle, FontWeight
|
||||
from gaphor.SysML.sysml import Requirement
|
||||
from gaphor.UML.classes.klass import (
|
||||
attribute_watches,
|
||||
|
@ -2,7 +2,7 @@ import pytest
|
||||
|
||||
from gaphor.core.modeling import ElementFactory
|
||||
from gaphor.core.modeling.elementdispatcher import ElementDispatcher
|
||||
from gaphor.diagram.tests.fixtures import diagram, event_manager
|
||||
from gaphor.diagram.tests.fixtures import diagram, event_manager # noqa F401
|
||||
from gaphor.SysML.modelinglanguage import SysMLModelingLanguage
|
||||
from gaphor.UML.modelinglanguage import UMLModelingLanguage
|
||||
|
||||
|
@ -23,7 +23,6 @@ from gaphor.core.modeling import Presentation
|
||||
from gaphor.diagram.presentation import LinePresentation, Named
|
||||
from gaphor.diagram.shapes import (
|
||||
Box,
|
||||
DrawContext,
|
||||
EditableText,
|
||||
Text,
|
||||
cairo_state,
|
||||
|
@ -5,7 +5,6 @@ Test connections to folded interface.
|
||||
from gaphor import UML
|
||||
from gaphor.tests import TestCase
|
||||
from gaphor.UML.classes.dependency import DependencyItem
|
||||
from gaphor.UML.classes.generalization import GeneralizationItem
|
||||
from gaphor.UML.classes.implementation import ImplementationItem
|
||||
from gaphor.UML.classes.interface import Folded, InterfaceItem
|
||||
from gaphor.UML.classes.klass import ClassItem
|
||||
|
@ -5,14 +5,7 @@ Artifact item.
|
||||
from gaphor import UML
|
||||
from gaphor.core.modeling.properties import attribute
|
||||
from gaphor.diagram.presentation import Classified, ElementPresentation
|
||||
from gaphor.diagram.shapes import (
|
||||
Box,
|
||||
EditableText,
|
||||
Text,
|
||||
cairo_state,
|
||||
draw_border,
|
||||
stroke,
|
||||
)
|
||||
from gaphor.diagram.shapes import Box, EditableText, Text, cairo_state, draw_border
|
||||
from gaphor.diagram.support import represents
|
||||
from gaphor.diagram.text import FontWeight, VerticalAlign
|
||||
from gaphor.UML.classes.stereotype import stereotype_compartments
|
||||
|
@ -1,5 +1,5 @@
|
||||
import gaphor.UML.uml as UML
|
||||
from gaphor.ui.iconname import get_default_icon_name, get_icon_name, to_kebab_case
|
||||
from gaphor.ui.iconname import get_default_icon_name, get_icon_name
|
||||
|
||||
|
||||
@get_icon_name.register(UML.Class)
|
||||
|
@ -1,4 +1,4 @@
|
||||
from gaphas.canvas import Canvas, instant_cairo_context
|
||||
from gaphas.canvas import instant_cairo_context
|
||||
|
||||
from gaphor import UML
|
||||
from gaphor.diagram.shapes import DrawContext
|
||||
|
@ -9,10 +9,10 @@ for normal properties.
|
||||
from __future__ import annotations
|
||||
|
||||
import itertools
|
||||
from typing import List, Optional, Tuple, Union
|
||||
from typing import List, Optional, Union
|
||||
|
||||
import gaphor.UML.umllex as umllex
|
||||
from gaphor.core.modeling.properties import association, derived
|
||||
from gaphor.core.modeling.properties import derived
|
||||
from gaphor.UML import uml
|
||||
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
from typing import Dict, List, Type
|
||||
from typing import Dict, List
|
||||
|
||||
import pytest
|
||||
|
||||
from gaphor.application import distribution
|
||||
from gaphor.codegen.profile_coder import (
|
||||
create_class_trees,
|
||||
create_referenced,
|
||||
filter_uml_classes,
|
||||
find_enumerations,
|
||||
@ -15,7 +14,6 @@ from gaphor.codegen.profile_coder import (
|
||||
write_attributes,
|
||||
write_properties,
|
||||
)
|
||||
from gaphor.core.modeling.properties import attribute, derived
|
||||
from gaphor.diagram.tests.fixtures import connect
|
||||
from gaphor.UML import uml as UML
|
||||
from gaphor.UML.classes import ClassItem
|
||||
|
@ -3,8 +3,6 @@ Event Manager.
|
||||
"""
|
||||
|
||||
|
||||
from typing import Sequence, Type
|
||||
|
||||
from generic.event import Event, Handler
|
||||
from generic.event import Manager as _Manager
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from logging import getLogger
|
||||
from typing import Callable, Dict, List, Optional, Set, Tuple
|
||||
from typing import Dict, List, Optional, Set, Tuple
|
||||
|
||||
from gaphor.abc import Service
|
||||
from gaphor.core import event_handler
|
||||
|
@ -12,7 +12,7 @@ See the documentation on the mixins.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Callable, Generic, Iterable, Sequence, TypeVar, overload
|
||||
from typing import Callable, Generic, Sequence, TypeVar, overload
|
||||
|
||||
__all__ = ["querymixin", "recursemixin"]
|
||||
|
||||
|
@ -8,7 +8,6 @@ from typing import (
|
||||
TYPE_CHECKING,
|
||||
Callable,
|
||||
Dict,
|
||||
Generator,
|
||||
Generic,
|
||||
List,
|
||||
Optional,
|
||||
|
@ -1,6 +1,3 @@
|
||||
import pytest
|
||||
import tinycss2
|
||||
|
||||
from gaphor.core.styling import CompiledStyleSheet, StyleDeclarations, parse_style_sheet
|
||||
from gaphor.core.styling.tests.test_selector import Node
|
||||
|
||||
|
@ -9,7 +9,6 @@ the actions bound to the toolbuttons should change as well.
|
||||
from typing import Callable, NamedTuple, Optional, Sequence, Tuple
|
||||
|
||||
from gaphor.core.modeling import Diagram, Presentation
|
||||
from gaphor.diagram.diagramtools import PlacementTool
|
||||
|
||||
ItemFactory = Callable[[Diagram, Optional[Presentation]], Presentation]
|
||||
|
||||
|
@ -3,9 +3,7 @@ Trivial drawing aids (box, line, ellipse).
|
||||
"""
|
||||
|
||||
import ast
|
||||
from typing import Optional
|
||||
|
||||
from gaphas.canvas import Canvas
|
||||
from gaphas.item import NW, Element
|
||||
from gaphas.item import Line as _Line
|
||||
from gaphas.util import path_ellipse
|
||||
|
@ -1,7 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import ast
|
||||
from dataclasses import replace
|
||||
from typing import Optional
|
||||
|
||||
import gaphas
|
||||
|
@ -30,11 +30,10 @@ import importlib
|
||||
from typing import Callable, Dict, List, Tuple, Type
|
||||
|
||||
import gaphas.item
|
||||
from gaphas.decorators import AsyncIO
|
||||
from gaphas.segment import Segment
|
||||
from gi.repository import Gdk, GObject, Gtk
|
||||
from gi.repository import Gdk, Gtk
|
||||
|
||||
from gaphor.core import gettext, transactional
|
||||
from gaphor.core import transactional
|
||||
from gaphor.core.modeling import Element
|
||||
|
||||
|
||||
|
@ -2,18 +2,14 @@ from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, replace
|
||||
from math import pi
|
||||
from typing import Callable, List, Optional, Sequence, Tuple, Union
|
||||
from typing import Callable, List, Optional, Tuple
|
||||
|
||||
from cairo import Context as CairoContext
|
||||
from gaphas.geometry import Rectangle
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
from gaphor.diagram.style import Style, combined_style
|
||||
from gaphor.diagram.text import (
|
||||
FontStyle,
|
||||
FontWeight,
|
||||
TextAlign,
|
||||
TextDecoration,
|
||||
VerticalAlign,
|
||||
focus_box_pos,
|
||||
text_draw,
|
||||
|
@ -1,5 +1,4 @@
|
||||
from gaphor import UML
|
||||
from gaphor.core.modeling import Presentation
|
||||
from gaphor.diagram.presentation import ElementPresentation, LinePresentation
|
||||
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import pytest
|
||||
|
||||
import gaphor.diagram.style
|
||||
from gaphor.core.styling import parse_style_sheet
|
||||
from gaphor.diagram.text import FontWeight
|
||||
|
||||
|
@ -8,7 +8,7 @@ from typing import Optional
|
||||
from gi.repository import GLib, Gtk
|
||||
|
||||
from gaphor.abc import ActionProvider
|
||||
from gaphor.core import Transaction, action, event_handler, gettext
|
||||
from gaphor.core import Transaction, action, event_handler
|
||||
from gaphor.core.modeling import Presentation, StyleSheet
|
||||
from gaphor.core.modeling.event import (
|
||||
AssociationUpdated,
|
||||
|
@ -22,7 +22,6 @@ from gaphor.core.modeling import (
|
||||
ModelFlushed,
|
||||
ModelReady,
|
||||
)
|
||||
from gaphor.SysML import sysml
|
||||
from gaphor.ui.abc import UIComponent
|
||||
from gaphor.ui.actiongroup import create_action_group
|
||||
from gaphor.ui.event import DiagramOpened
|
||||
|
@ -4,9 +4,6 @@ from gaphas.aspect import ConnectionSink, Connector
|
||||
from gaphor import UML
|
||||
from gaphor.application import Application
|
||||
from gaphor.core import transactional
|
||||
from gaphor.core.eventmanager import EventManager
|
||||
from gaphor.core.modeling import ElementFactory
|
||||
from gaphor.services.undomanager import UndoManager
|
||||
from gaphor.UML.classes import AssociationItem, ClassItem
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user