Skip to content

Commit 8717979

Browse files
mergify[bot]haiiliinpre-commit-ci[bot]github-actions[bot]
authored
[typing] Fix typing error about data arrays (backport #5732) (#5745)
Co-authored-by: Hailin Wang <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent d023384 commit 8717979

File tree

126 files changed

+280
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+280
-226
lines changed

src/abaqus/Adaptivity/RemeshingRule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class RemeshingRule:
4141

4242
#: A sequence of Strings specifying the output request variables that Abaqus will use as
4343
#: error indicators.
44-
variables: tuple
44+
variables: tuple[str, ...] = ()
4545

4646
#: A String specifying a descriptive string for this rule. The default value is an empty
4747
#: string.

src/abaqus/Adaptivity/RuleResult.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class RuleResult:
3737

3838
#: A sequence of Strings specifying the error indicator variables that have satisfied the
3939
#: Remeshing Rule.
40-
satisfiedVars: tuple = ()
40+
satisfiedVars: tuple[str, ...] = ()
4141

4242
@abaqus_method_doc
4343
def __init__(

src/abaqus/Amplitude/BaselineCorrection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BaselineCorrection:
2424
#: A sequence of Floats specifying the correction time interval end points. Possible values
2525
#: are positive and monotonically increasing Floats. The default value is an empty
2626
#: sequence.
27-
intervals: tuple = ()
27+
intervals: tuple[float, ...] = ()
2828

2929
@abaqus_method_doc
3030
def __init__(self, intervals: tuple = ()):

src/abaqus/Amplitude/Correlation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Correlation(Amplitude):
2929
#: A tuple of tuples of Floats specifying the real and imaginary part of the scaling
3030
#: factor. If **approach** = MOVING_NOISE, then **data** represents the noise velocity components
3131
#: 1, 2, and 3.
32-
data: float | None = None
32+
data: tuple[tuple[float, ...], ...] = ()
3333

3434
#: A SymbolicConstant specifying the time span of the amplitude. Possible values are STEP
3535
#: and TOTAL. The default value is STEP.

src/abaqus/Amplitude/EquallySpacedAmplitude.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class EquallySpacedAmplitude(Amplitude):
4141
fixedInterval: float
4242

4343
#: A sequence of Floats specifying the amplitude values.
44-
data: tuple
44+
data: tuple[float, ...] = ()
4545

4646
#: A Float specifying the time at which the first amplitude data are given. Possible values
4747
#: are non-negative numbers. The default value is 0.0.

src/abaqus/Amplitude/PeriodicAmplitude.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class PeriodicAmplitude(Amplitude):
4040
a_0: float
4141

4242
#: A sequence of pairs of Floats specifying AiAi and BiBi pairs.
43-
data: tuple
43+
data: tuple[tuple[float, float], ...] = ()
4444

4545
#: A SymbolicConstant specifying the time span of the amplitude. Possible values are STEP
4646
#: and TOTAL. The default value is STEP.

src/abaqus/Amplitude/PsdDefinition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PsdDefinition(Amplitude):
3333
#: A sequence of sequences of Floats specifying the real part of the frequency function,
3434
#: the imaginary part of the frequency function, and the frequency or frequency band number
3535
#: values, depending on the value of **unitType**.
36-
data: tuple
36+
data: tuple[tuple[float, ...], ...] = ()
3737

3838
#: A SymbolicConstant specifying the type of units for specifying the frequency function.
3939
#: FORCE implies power units. BASE implies gravity used to define base motion. DB implies

src/abaqus/Amplitude/SmoothStepAmplitude.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class SmoothStepAmplitude(Amplitude):
3232

3333
#: A sequence of pairs of Floats specifying time/frequency and amplitude pairs. Possible
3434
#: values for time/frequency are positive numbers.
35-
data: tuple
35+
data: tuple[tuple[float, float], ...] = ()
3636

3737
#: A SymbolicConstant specifying the time span of the amplitude. Possible values are STEP
3838
#: and TOTAL. The default value is STEP.

src/abaqus/Amplitude/SpectrumAmplitude.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class SpectrumAmplitude(Amplitude):
4545

4646
#: A sequence of sequences of Floats specifying the magnitude, frequency, and damping
4747
#: values.
48-
data: tuple
48+
data: tuple[tuple[float, ...], ...] = ()
4949

5050
#: A SymbolicConstant specifying the units used for specifying the spectrum. Possible
5151
#: values are DISPLACEMENT, VELOCITY, ACCELERATION, and GRAVITY. The default value is

src/abaqus/Amplitude/TabularAmplitude.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class TabularAmplitude(Amplitude):
3838

3939
#: A sequence of pairs of Floats specifying time/frequency and amplitude pairs. Possible
4040
#: values for time/frequency are positive numbers.
41-
data: Sequence[Sequence[float]]
41+
data: tuple[tuple[float, float], ...] = ()
4242

4343
#: The SymbolicConstant SOLVER_DEFAULT or a Float specifying the degree of smoothing.
4444
#: Possible float values are between 0 and 0.5. If **smooth** = SOLVER_DEFAULT, the default

0 commit comments

Comments
 (0)