Skip to content

Commit

Permalink
Update versions used in pre-commit hooks (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
widerschein authored May 14, 2024
1 parent 16b0a07 commit 964487c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 21 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:

- repo: https://github.com/psf/black
rev: 23.1.0 # Modify "blacken-docs" to point to this version
rev: 24.4.2 # Modify "blacken-docs" to point to this version
hooks:
- id: black

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.13.0
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.1.0]
additional_dependencies: [black==24.4.2]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

Expand All @@ -36,7 +36,7 @@ repos:
exclude: "tests/|examples/"

- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.2.8
rev: v0.3.1
hooks:
- id: add-license-headers
args:
Expand Down
14 changes: 7 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
MIT License

Copyright (c) 2023 ANSYS, Inc. All rights reserved.
Copyright (c) 2022 - 2024 ANSYS, Inc. and/or its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Expand Down
8 changes: 5 additions & 3 deletions src/ansys/optislang/core/tcp/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ def add_criterion(self, criterion: Criterion) -> None:
criterion_type=criterion.criterion.name,
expression=criterion.expression,
name=criterion.name,
limit=criterion.limit_expression
if isinstance(criterion, (ConstraintCriterion, LimitStateCriterion))
else None,
limit=(
criterion.limit_expression
if isinstance(criterion, (ConstraintCriterion, LimitStateCriterion))
else None
),
)

def get_criteria(self) -> Tuple[Criterion, ...]:
Expand Down
8 changes: 2 additions & 6 deletions src/ansys/optislang/core/tcp/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3277,9 +3277,7 @@ def create_edge_from_dict(
rec_slot_type = (
SlotType.INNER_INPUT
if connection.get("receiving_slot_is_inner", None)
else SlotType.INPUT
if connection.get("receiving_slot_is_inner") is False
else None
else SlotType.INPUT if connection.get("receiving_slot_is_inner") is False else None
)
if rec_slot_type is None:
info = osl_server.get_actor_info(
Expand Down Expand Up @@ -3308,9 +3306,7 @@ def create_edge_from_dict(
sen_slot_type = (
SlotType.INNER_OUTPUT
if connection.get("sending_slot_is_inner", None)
else SlotType.OUTPUT
if connection.get("sending_slot_is_inner") is False
else None
else SlotType.OUTPUT if connection.get("sending_slot_is_inner") is False else None
)
if sen_slot_type is None:
info = osl_server.get_actor_info(
Expand Down

0 comments on commit 964487c

Please sign in to comment.