Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
CagtayFabry committed Apr 2, 2024
1 parent d0ff8c5 commit 84d19ce
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion weldx/asdf/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ def __init__(
write_kwargs: Mapping = None,
tree: Mapping = None,
sync: bool = True,
custom_schema: None | (
custom_schema: None
| (
types_path_like,
tuple[None, types_path_like],
) = None,
Expand Down
4 changes: 1 addition & 3 deletions weldx/asdf/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,9 +675,7 @@ def __iter__(self):
def __contains__(self, item):
return item in self.keys()

def update(
self, mapping: Mapping[Hashable, Any], **kwargs: Any
): # pylint: disable=W0221
def update(self, mapping: Mapping[Hashable, Any], **kwargs: Any): # pylint: disable=W0221
_mapping = dict(mapping, **kwargs) # merge mapping and kwargs
if any(key in self.protected_keys for key in _mapping.keys()):
self._warn_protected_keys()
Expand Down
7 changes: 5 additions & 2 deletions weldx/core/generic_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ def __init__(
if dims is not None and not isinstance(dims, dict):
raise ValueError(f"Argument 'dims' must be dict, not {dims}")
self._init_expression(
obj, dims, parameters, {k: U_(v) for k, v in units.items()} # catch str
obj,
dims,
parameters,
{k: U_(v) for k, v in units.items()}, # catch str
)
else:
raise TypeError(f'The data type "{type(obj)}" is not supported.')
Expand Down Expand Up @@ -403,7 +406,7 @@ def _test_expr(expr, dims, units: dict[str, pint.Unit]) -> pint.Unit:

@staticmethod
def _format_expression_params(
parameters: dict[str, pint.Quantity | xr.DataArray]
parameters: dict[str, pint.Quantity | xr.DataArray],
) -> dict[str, pint.Quantity | xr.DataArray]:
"""Create expression parameters as a valid internal type.
Expand Down
2 changes: 1 addition & 1 deletion weldx/util/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def _get_coordinate_quantities(da) -> dict[str, pint.Quantity]:


def _coordinates_from_quantities(
q_dict: dict[str, pint.Quantity]
q_dict: dict[str, pint.Quantity],
) -> dict[str, tuple[str, np.ndarray, dict[str, pint.Unit]]]:
"""Create a dict with unit information that can be passed as coords for xarray."""
return {
Expand Down
3 changes: 2 additions & 1 deletion weldx/welding/groove/iso_9692_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,8 @@ def to_profile(self, width_default: pint.Quantity = None) -> geo.Profile:
segment_list.append("line")

x_value = np.append(
x_value, (0, -x_upper, -(s_upper + x_upper), -width) # skipcq: PYL-E1130
x_value,
(0, -x_upper, -(s_upper + x_upper), -width), # skipcq: PYL-E1130
)
y_value = np.append(y_value, (h2 + c + R, t - (h1 - (R - y_upper)), t, t))
segment_list += ["arc", "line", "line"]
Expand Down

0 comments on commit 84d19ce

Please sign in to comment.