• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haiiliin / abqpy / 5910646359

19 Aug 2023 09:25AM UTC coverage: 83.152% (-0.1%) from 83.3%
5910646359

push

github

web-flow
[typing] Fix wrong mypy typing annotations (backport #4879) (#4880)

* [typing] Fix wrong mypy typing annotations (#4879)

* Fix mypy abqpy issues

* Mypy typings

* Update typing annotations for SymbolicConstants

* Fixing typings

* Add future annotations

* Use list/dict/tuple instead of List/Dict/Tuple

* Fix Optional typings

* Add future annotations

* Update xyPlot.py

* Update .pre-commit-config.yaml

* Fix list typings for Python 3.7/3.8

* Fixing more typings

* Fix more typings

* Update conf.py

* Update .pre-commit-config.yaml

* Revert "Update conf.py"

This reverts commit e8449ae0c.

* Update conf.py

* Revert "Update conf.py"

This reverts commit 3be44d0a5.

* Docs Not -W

(cherry picked from commit d7be4b472)

# Conflicts:
#	src/abaqus/BasicGeometry/Cell.py
#	src/abaqus/BasicGeometry/CellArray.py
#	src/abaqus/BasicGeometry/Face.py
#	src/abaqus/BasicGeometry/FaceArray.py
#	src/abaqus/BoundaryCondition/BoundaryConditionModel.py
#	src/abaqus/BoundaryCondition/SubmodelBC.py
#	src/abaqus/Datum/DatumCsys.py
#	src/abaqus/DisplayGroup/LeafFromConstraintNames.py
#	src/abaqus/EngineeringFeature/DataImperfection.py
#	src/abaqus/EngineeringFeature/EngineeringFeature.py
#	src/abaqus/EngineeringFeature/EngineeringFeatureBase.py
#	src/abaqus/EngineeringFeature/FileImperfection.py
#	src/abaqus/EngineeringFeature/InputImperfection.py
#	src/abaqus/FieldReport/FieldReportSession.py
#	src/abaqus/FieldReport/writeFieldReport.py
#	src/abaqus/Interaction/ContactExp.py
#	src/abaqus/Interaction/ContactStd.py
#	src/abaqus/Interaction/ExpInitialization.py
#	src/abaqus/Interaction/FluidInflatorProperty.py
#	src/abaqus/Interaction/FluidInflatorState.py
#	src/abaqus/Interaction/InteractionContactInitializationModel.py
#	src/abaqus/Interaction/InteractionModel.py
#	src/abaqus/Interaction/InteractionPropertyModel.py
#	src/abaqus/Interaction/SurfaceCrushTriggerAssignment.py
#... (continued)

3258 of 3258 new or added lines in 713 files covered. (100.0%)

24089 of 28970 relevant lines covered (83.15%)

0.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/abaqus/BasicGeometry/Vertex.py
1
from __future__ import annotations
1✔
2

3
from typing import TYPE_CHECKING
1✔
4

5
from abqpy.decorators import abaqus_class_doc, abaqus_method_doc
1✔
6

7
from ..Mesh.MeshElement import MeshElement
1✔
8
from ..Mesh.MeshNode import MeshNode
1✔
9
from ..UtilityAndView.abaqusConstants import OFF, Boolean
1✔
10

11
if TYPE_CHECKING:  # to avoid circular imports
1✔
12
    from ..Mesh.MeshElementArray import MeshElementArray
×
13
    from ..Mesh.MeshNodeArray import MeshNodeArray
×
14

15

16
@abaqus_class_doc
1✔
17
class Vertex:
1✔
18
    """Vertices are point regions of geometry.
19

20
    .. note::
21
        This object can be accessed by::
22

23
            import part
24
            mdb.models[name].parts[name].allInternalSets[name].vertices[i]
25
            mdb.models[name].parts[name].allSets[name].vertices[i]
26
            mdb.models[name].parts[name].sets[name].vertices[i]
27
            mdb.models[name].parts[name].vertices[i]
28
            import assembly
29
            mdb.models[name].rootAssembly.allInstances[name].sets[name].vertices[i]
30
            mdb.models[name].rootAssembly.allInstances[name].vertices[i]
31
            mdb.models[name].rootAssembly.allInternalSets[name].vertices[i]
32
            mdb.models[name].rootAssembly.allSets[name].vertices[i]
33
            mdb.models[name].rootAssembly.instances[name].sets[name].vertices[i]
34
            mdb.models[name].rootAssembly.instances[name].vertices[i]
35
            mdb.models[name].rootAssembly.modelInstances[i].sets[name].vertices[i]
36
            mdb.models[name].rootAssembly.modelInstances[i].vertices[i]
37
            mdb.models[name].rootAssembly.sets[name].vertices[i]
38
            mdb.models[name].rootAssembly.vertices[i]
39
    """
40

41
    #: An Int specifying the index of the ConstrainedSketchVertex in the VertexArray.
42
    index: int
1✔
43

44
    #: A Boolean specifying whether the vertex belongs to the reference representation of the
45
    #: Part or Instance.
46
    isReferenceRep: Boolean = OFF
1✔
47

48
    #: A tuple of Floats specifying the **X** -, **Y** -, and **Z** -coordinates of the vertex.
49
    pointOn: tuple[float, float, float]
1✔
50

51
    #: A tuple of Floats specifying the name of the feature that created this vertex.
52
    featureName: tuple[float, ...]
1✔
53

54
    #: A tuple of Floats specifying the name of the part instance for this vertex (if
55
    #: applicable).
56
    instanceName: tuple[float, ...]
1✔
57

58
    @abaqus_method_doc
1✔
59
    def getEdges(self) -> tuple[int]:
1✔
60
        """This method returns a sequence consisting of the edge ids of the edges which share this vertex.
61

62
        Returns
63
        -------
64
        tuple[int]
65
            A tuple of integers.
66
        """
67
        return (0,)
×
68

69
    @abaqus_method_doc
1✔
70
    def getNodes(self) -> MeshNodeArray:
1✔
71
        """This method returns an array of node objects that are associated with the vertex.
72

73
        Returns
74
        -------
75
        MeshNodeArray
76
            A MeshNodeArray object which is a sequence of MeshNode objects.
77
        """
78
        return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))])
×
79

80
    @abaqus_method_doc
1✔
81
    def getElements(self) -> MeshElementArray:
1✔
82
        """This method returns an array of element objects that are associated with the vertex.
83

84
        Returns
85
        -------
86
        MeshElementArray
87
            A MeshElementArray object which is a sequence of MeshElement objects.
88
        """
89
        return MeshElementArray([MeshElement()])
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc