Skip to content

Commit a71ce0b

Browse files
authored
chore: various metadata and tool modifications (#3)
1 parent 5f06156 commit a71ce0b

File tree

4 files changed

+19
-31
lines changed

4 files changed

+19
-31
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ repos:
3434
- id: check-github-workflows
3535

3636
- repo: https://github.com/astral-sh/ruff-pre-commit
37-
rev: v0.11.7
37+
rev: v0.11.11
3838
hooks:
39-
- id: ruff
40-
args: [--fix]
39+
- id: ruff-check
40+
- id: ruff-format

pyproject.toml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,33 @@
11
[build-system]
2-
requires = ["flit_core >=3.2,<3.11"]
2+
requires = ["flit_core >=3.2,<4"]
33
build-backend = "flit_core.buildapi"
44

55
[project]
66
name = "ansys-tools-common"
7-
version = "0.8.dev0"
7+
version = "0.1.dev0"
88
description = "A set of tools for PyAnsys libraries"
99
readme = "README.rst"
1010
requires-python = ">=3.10,<4"
11-
license = { file = "LICENSE" }
11+
license = "MIT"
12+
license-files = ["LICENSE"]
1213
authors = [{ name = "ANSYS, Inc.", email = "[email protected]" }]
1314
maintainers = [{ name = "ANSYS, Inc.", email = "[email protected]" }]
1415
classifiers = [
1516
"Development Status :: 4 - Beta",
1617
"Intended Audience :: Science/Research",
1718
"Topic :: Scientific/Engineering :: Information Analysis",
18-
"License :: OSI Approved :: MIT License",
1919
"Operating System :: OS Independent",
2020
"Programming Language :: Python :: 3.10",
2121
"Programming Language :: Python :: 3.11",
2222
"Programming Language :: Python :: 3.12",
2323
"Programming Language :: Python :: 3.13",
2424
]
25-
dependencies = [
26-
27-
]
25+
dependencies = []
2826

2927
[project.optional-dependencies]
3028

31-
tests = [
32-
33-
]
34-
35-
doc = [
36-
37-
]
29+
tests = []
30+
doc = []
3831

3932
[project.urls]
4033
Source = "https://github.com/ansys/ansys-tools"
@@ -46,17 +39,9 @@ Releases = "https://github.com/ansys/ansys-tools/releases/"
4639
[tool.flit.module]
4740
name = "ansys.tools"
4841

49-
[tool.black]
50-
line-length = 100
51-
52-
[tool.isort]
53-
profile = "black"
54-
force_sort_within_sections = true
55-
line_length = 100
56-
src_paths = ["doc", "src", "tests"]
57-
5842
[tool.ruff]
5943
line-length = 120
44+
fix = true
6045
extend-exclude = ["examples/**/*.py"]
6146

6247
[tool.ruff.lint]
@@ -68,12 +53,14 @@ select = [
6853
"N", # pep8-naming, see https://beta.ruff.rs/docs/rules/#pep8-naming-n
6954
"PTH", # flake8-use-pathlib, https://beta.ruff.rs/docs/rules/#flake8-use-pathlib-pth
7055
]
71-
ignore = ["D416"]
56+
ignore = []
7257

7358
[tool.ruff.format]
7459
quote-style = "double"
75-
indent-style = "tab"
60+
indent-style = "space"
7661
line-ending = "auto"
62+
docstring-code-format = true
63+
docstring-code-line-length = "dynamic"
7764

7865
[tool.ruff.lint.isort]
7966
combine-as-imports = true
@@ -82,7 +69,7 @@ known-first-party = ["ansys"]
8269

8370
[tool.ruff.lint.pydocstyle]
8471
# Settings: https://docs.astral.sh/ruff/settings/#lintpydocstyle
85-
convention = "google"
72+
convention = "numpy"
8673

8774
[tool.towncrier]
8875
package = "ansys.tools"

src/ansys/tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
22-
"""Main module."""
22+
"""Main module."""

src/ansys/tools/exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ class AnsysTypeError(AnsysError):
5151
def __init__(self, expected_type: str | type, actual_type: str | type = None) -> None:
5252
"""Initialize the exception with expected and actual types."""
5353
expected_type = expected_type if isinstance(expected_type, str) else expected_type.__name__
54-
actual_type= actual_type if isinstance(actual_type, str) else actual_type.__name__
54+
actual_type = actual_type if isinstance(actual_type, str) else actual_type.__name__
5555
message = f"Expected type {expected_type}, but got {actual_type}."
5656
super().__init__(message)
5757
self.expected_type = expected_type
5858
self.actual_type = actual_type
5959

60+
6061
class AnsysLogicError(AnsysError):
6162
"""Exception raised when an unexpected logical condition occurs.
6263

0 commit comments

Comments
 (0)