Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
89c29b3
types: begin
Gobot1234 Nov 18, 2025
2d47d6e
annotate singleton meta
Gobot1234 Nov 27, 2025
06e5200
more work
Gobot1234 Dec 5, 2025
ac2e313
Merge branch 'main' into jhilton/types
Gobot1234 Dec 22, 2025
4150330
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 22, 2025
c09991e
more types
Gobot1234 Dec 22, 2025
b2c91f4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 22, 2025
0e658a1
types: more
Gobot1234 Dec 27, 2025
448e385
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 27, 2025
322c611
fix some more types
Gobot1234 Jan 13, 2026
e601d66
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 13, 2026
6d5c563
attempt to use more inheritance
Gobot1234 Jan 16, 2026
03dfeff
unnest the create method
Gobot1234 Jan 16, 2026
5bce65f
get rid of more confusing api
Gobot1234 Jan 16, 2026
306d277
more work
Gobot1234 Jan 19, 2026
70f764b
Update pyproject.toml
Gobot1234 Jan 22, 2026
a5c6193
fix more type issues
Gobot1234 Jan 23, 2026
3b97e65
Add baseline
Gobot1234 Feb 4, 2026
ba9ab70
remove importlib-metadata
Gobot1234 Feb 4, 2026
d291a53
final round of changes
Gobot1234 Feb 4, 2026
808fff4
Merge branch 'main' into jhilton/types
Gobot1234 Feb 4, 2026
a28c183
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2026
086bd19
fix ci
Gobot1234 Feb 4, 2026
2b3be8b
Merge branch 'main' into jhilton/types
Gobot1234 Feb 12, 2026
728bb47
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 12, 2026
157788f
Merge branch 'jhilton/types' of https://github.com/ansys/pyfluent-vis…
Gobot1234 Feb 13, 2026
32e70d8
maybe fix some ci
Gobot1234 Feb 13, 2026
67ab5fc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 13, 2026
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
11,626 changes: 11,626 additions & 0 deletions .ci/basedpyright.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/source/_ext/autodocclass.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from enum import IntEnum
from typing import Any, Optional
from typing import Any

from docutils.statemachine import StringList
from sphinx.application import Sphinx
Expand Down Expand Up @@ -28,7 +28,7 @@ def add_directive_header(self, sig: str) -> None:
super().add_directive_header(sig)
self.add_line(" ", self.get_sourcename())

def add_content(self, more_content: Optional[StringList]) -> None:
def add_content(self, more_content: StringList | None) -> None:
super().add_content(more_content)

source_name = self.get_sourcename()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@
graphics_window = GraphicsWindow()

surf_xy_plane = PlaneSurface.create_from_point_and_normal(
point=[0.0, 0.0, -0.0441921], normal=[0.0, 0.0, 1.0]
point=(0.0, 0.0, -0.0441921), normal=(0.0, 0.0, 1.0)
)
graphics_window.add_graphics(surf_xy_plane, position=(0, 0))

surf_yz_plane = PlaneSurface.create_from_point_and_normal(
point=[-0.174628, 0.0, 0.0], normal=[1.0, 0.0, 0.0]
point=(-0.174628, 0.0, 0.0), normal=(1.0, 0.0, 0.0)
)
graphics_window.add_graphics(surf_yz_plane, position=(0, 1))

surf_zx_plane = PlaneSurface.create_from_point_and_normal(
point=[0.0, -0.0627297, 0.0], normal=[0.0, 1.0, 0.0]
point=(0.0, -0.0627297, 0.0), normal=(0.0, 1.0, 0.0)
)
graphics_window.add_graphics(surf_zx_plane, position=(0, 2))

Expand Down
17 changes: 15 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ packages = [

[tool.poetry.dependencies]
python = ">=3.10,<3.14"
importlib-metadata = {version = "^4.0", python = "<3.9"}
ansys-fluent-core = "~=0.38.dev0"
ansys-fluent-core = { git = "https://github.com/ansys/pyfluent", branch = "jhilton/typing-improvements" }
ansys-units = "0.10.0"
pyvista = ">=0.44.0"
matplotlib = ">=3.6.0"
pyvistaqt = { version = "~=0.11.1", optional = true }
Expand All @@ -34,6 +34,7 @@ pyside6 = { version = "~=6.8.1", optional = true }
[tool.poetry.extras]
interactive = ["pyvistaqt"]
single-window = ["pyvistaqt", "pyside6"]
ci_types = ["pyvistaqt", "pyside6", "ipython"]

[tool.poetry.urls]
"Documentation" = "https://visualization.fluent.docs.pyansys.com/"
Expand Down Expand Up @@ -77,3 +78,15 @@ skips = [
"B604",
"B607",
]

[tool.basedpyright]
reportAny = false
reportUnknownMemberType = false
reportExplicitAny = false
reportPrivateUsage = false
reportUnusedCallResult = false
reportUnannotatedClassAttribute = false
reportPrivateImportUsage = false
ignore = ["doc"]
reportMissingTypeStubs=false
baselineFile = ".ci/basedpyright.json"
10 changes: 7 additions & 3 deletions src/ansys/fluent/interface/post_objects/check_in_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,25 @@
# SOFTWARE.

"""Provides a module to check if the library is being used in a Jupyter environment."""

import warnings

from ansys.fluent.core import PyFluentDeprecationWarning


def in_jupyter():
def in_jupyter() -> bool:
"""Checks if the library is being used in a Jupyter environment."""
try:
from IPython import get_ipython

return "IPKernelApp" in get_ipython().config
return (
"IPKernelApp"
in get_ipython().config # pyright: ignore[reportOptionalMemberAccess]
)
except (ImportError, AttributeError):
return False


def in_notebook():
def in_notebook() -> bool:
warnings.warn("Please use 'in_jupyter' instead.", PyFluentDeprecationWarning)
return in_jupyter()
Loading
Loading