Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[typing] Fix typing error about data arrays (backport #5732) #5746

Merged
merged 6 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2024"
assignees:
Expand All @@ -23,6 +29,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2024"
assignees:
Expand All @@ -42,6 +54,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2023"
assignees:
Expand All @@ -60,6 +78,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2023"
assignees:
Expand All @@ -79,6 +103,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2022"
assignees:
Expand All @@ -97,6 +127,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2022"
assignees:
Expand All @@ -116,6 +152,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2021"
assignees:
Expand All @@ -134,6 +176,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2021"
assignees:
Expand All @@ -153,6 +201,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2020"
assignees:
Expand All @@ -171,6 +225,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2020"
assignees:
Expand All @@ -190,6 +250,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2019"
assignees:
Expand All @@ -208,6 +274,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2019"
assignees:
Expand All @@ -227,6 +299,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2018"
assignees:
Expand All @@ -245,6 +323,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2018"
assignees:
Expand All @@ -264,6 +348,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2017"
assignees:
Expand All @@ -282,6 +372,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2017"
assignees:
Expand All @@ -301,6 +397,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2016"
assignees:
Expand All @@ -319,6 +421,12 @@ pull_request_rules:
actions:
backport:
title: "{{ title }} (backport #{{ number }})"
body: |
{{ body }}

This is an automatic backport of pull request #{{number}} done by [Mergify](https://mergify.com).

{{ cherry_pick_error }}
branches:
- "2016"
assignees:
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Adaptivity/RemeshingRule.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class RemeshingRule:

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

#: A String specifying a descriptive string for this rule. The default value is an empty
#: string.
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Adaptivity/RuleResult.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class RuleResult:

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

@abaqus_method_doc
def __init__(
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Amplitude/BaselineCorrection.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BaselineCorrection:
#: A sequence of Floats specifying the correction time interval end points. Possible values
#: are positive and monotonically increasing Floats. The default value is an empty
#: sequence.
intervals: tuple = ()
intervals: tuple[float, ...] = ()

@abaqus_method_doc
def __init__(self, intervals: tuple = ()):
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Amplitude/Correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Correlation(Amplitude):
#: A tuple of tuples of Floats specifying the real and imaginary part of the scaling
#: factor. If **approach** = MOVING_NOISE, then **data** represents the noise velocity components
#: 1, 2, and 3.
data: float | None = None
data: tuple[tuple[float, ...], ...] = ()

#: A SymbolicConstant specifying the time span of the amplitude. Possible values are STEP
#: and TOTAL. The default value is STEP.
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Amplitude/EquallySpacedAmplitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class EquallySpacedAmplitude(Amplitude):
fixedInterval: float

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

#: A Float specifying the time at which the first amplitude data are given. Possible values
#: are non-negative numbers. The default value is 0.0.
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Amplitude/PeriodicAmplitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PeriodicAmplitude(Amplitude):
a_0: float

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

#: A SymbolicConstant specifying the time span of the amplitude. Possible values are STEP
#: and TOTAL. The default value is STEP.
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Amplitude/PsdDefinition.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PsdDefinition(Amplitude):
#: A sequence of sequences of Floats specifying the real part of the frequency function,
#: the imaginary part of the frequency function, and the frequency or frequency band number
#: values, depending on the value of **unitType**.
data: tuple
data: tuple[tuple[float, ...], ...] = ()

#: A SymbolicConstant specifying the type of units for specifying the frequency function.
#: FORCE implies power units. BASE implies gravity used to define base motion. DB implies
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Amplitude/SmoothStepAmplitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SmoothStepAmplitude(Amplitude):

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

#: A SymbolicConstant specifying the time span of the amplitude. Possible values are STEP
#: and TOTAL. The default value is STEP.
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Amplitude/SpectrumAmplitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SpectrumAmplitude(Amplitude):

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

#: A SymbolicConstant specifying the units used for specifying the spectrum. Possible
#: values are DISPLACEMENT, VELOCITY, ACCELERATION, and GRAVITY. The default value is
Expand Down
2 changes: 1 addition & 1 deletion src/abaqus/Amplitude/TabularAmplitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TabularAmplitude(Amplitude):

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

#: The SymbolicConstant SOLVER_DEFAULT or a Float specifying the degree of smoothing.
#: Possible float values are between 0 and 0.5. If **smooth** = SOLVER_DEFAULT, the default
Expand Down
34 changes: 30 additions & 4 deletions src/abaqus/Annotation/Arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,20 @@ class Arrow(Annotation, _OptionsBase):
#: - TOP_RIGHT
#:
#: The default value is BOTTOM_LEFT.
startAnchor: Union[SymbolicConstant, float] = BOTTOM_LEFT
startAnchor: Union[
Literal[
C.CENTER_RIGHT,
C.TOP_CENTER,
C.BOTTOM_RIGHT,
C.BOTTOM_LEFT,
C.CENTER,
C.TOP_RIGHT,
C.CENTER_LEFT,
C.TOP_LEFT,
C.BOTTOM_CENTER,
],
tuple[float, ...],
] = BOTTOM_LEFT

#: A SymbolicConstant or a sequence of Floats specifying a point. A sequence of two Floats
#: specifies the **X** and **Y** coordinates as percentages of the viewport width and height.
Expand All @@ -80,7 +93,20 @@ class Arrow(Annotation, _OptionsBase):
#: - TOP_RIGHT
#:
#: The default value is BOTTOM_LEFT.
endAnchor: Union[SymbolicConstant, float] = BOTTOM_LEFT
endAnchor: Union[
Literal[
C.CENTER_RIGHT,
C.TOP_CENTER,
C.BOTTOM_RIGHT,
C.BOTTOM_LEFT,
C.CENTER,
C.TOP_RIGHT,
C.CENTER_LEFT,
C.TOP_LEFT,
C.BOTTOM_CENTER,
],
tuple[float, ...],
] = BOTTOM_LEFT

#: A SymbolicConstant specifying the style of the start head. Possible values are:
#:
Expand Down Expand Up @@ -150,7 +176,7 @@ def __init__(
C.TOP_LEFT,
C.BOTTOM_CENTER,
],
float,
tuple[float, ...],
] = BOTTOM_LEFT,
endAnchor: Union[
Literal[
Expand All @@ -164,7 +190,7 @@ def __init__(
C.TOP_LEFT,
C.BOTTOM_CENTER,
],
float,
tuple[float, ...],
] = BOTTOM_LEFT,
startHeadStyle: Literal[
C.FILLED_DIAMOND,
Expand Down
Loading