• 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

0.0
/src/abaqus/Field/ExpressionField.py
1
from __future__ import annotations
×
2

3
from abaqus.Datum.DatumCsys import DatumCsys
×
4
from abqpy.decorators import abaqus_class_doc, abaqus_method_doc
×
5

6
from .AnalyticalField import AnalyticalField
×
7

8

9
@abaqus_class_doc
×
10
class ExpressionField(AnalyticalField):
×
11
    """The ExpressionField object defines a spatially varying field whose value is calculated from a user-
12
    supplied mathematical expression. The ExpressionField object is derived from the AnalyticalField object.
13

14
    .. note::
15
        This object can be accessed by::
16

17
            import fields
18
            mdb.models[name].analyticalFields[name]
19
    """
20

21
    #: A String specifying the repository key.
22
    name: str
×
23

24
    #: A String specifying the Python expression to evaluate in space. Variables are X, Y, and
25
    #: Z; R, Th, and Z; or R, Th, and P based on the selected coordinate system.
26
    expression: str
×
27

28
    #: None or a DatumCsys object specifying the local coordinate system of the field. If
29
    #: **localCsys** = None, the field is defined in the global coordinate system. The default
30
    #: value is None.
31
    localCsys: DatumCsys | None = None
×
32

33
    #: A String specifying the description of the field. The default value is an empty string.
34
    description: str = ""
×
35

36
    @abaqus_method_doc
×
37
    def __init__(self, name: str, expression: str, localCsys: str | None = None, description: str = ""):
×
38
        """This method creates an ExpressionField object.
39

40
        .. note::
41
            This function can be accessed by::
42

43
                mdb.models[name].ExpressionField
44

45
        Parameters
46
        ----------
47
        name
48
            A String specifying the repository key.
49
        expression
50
            A String specifying the Python expression to evaluate in space. Variables are X, Y, and
51
            Z; R, Th, and Z; or R, Th, and P based on the selected coordinate system.
52
        localCsys
53
            None or a DatumCsys object specifying the local coordinate system of the field. If
54
            **localCsys** = None, the field is defined in the global coordinate system. The default
55
            value is None.
56
        description
57
            A String specifying the description of the field. The default value is an empty string.
58

59
        Returns
60
        -------
61
        ExpressionField
62
            An ExpressionField object.
63

64
        Raises
65
        ------
66
        TextException
67
        """
68
        super().__init__()
×
69

70
    @abaqus_method_doc
×
71
    def setValues(self, localCsys: str | None = None, description: str = ""):
×
72
        """This method modifies the ExpressionField object.
73

74
        Parameters
75
        ----------
76
        localCsys
77
            None or a DatumCsys object specifying the local coordinate system of the field. If
78
            **localCsys** = None, the field is defined in the global coordinate system. The default
79
            value is None.
80
        description
81
            A String specifying the description of the field. The default value is an empty string.
82
        """
83
        ...
×
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