Skip to content

Conversation

@alexfikl
Copy link
Collaborator

Started removing RUF067 yesterday and ended up doing some more random cleanup in meshmode.mesh. The commits should be self-explanatory.

Comment on lines 91 to 97
IndexArray: TypeAlias = np.ndarray[tuple[int], np.dtype[np.integer[Any]]]

VertexIndices: TypeAlias = np.ndarray[tuple[int, int], np.dtype[np.integer[Any]]]
VertexArray: TypeAlias = np.ndarray[tuple[int, int], np.dtype[np.floating[Any]]]

NodesArray: TypeAlias = np.ndarray[tuple[int, int, int], np.dtype[np.floating[Any]]]
RefNodesArray: TypeAlias = np.ndarray[tuple[int, int], np.dtype[np.floating[Any]]]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been pretty liberal with adding these local type aliases, mostly because Sphinx expands them, so they don't really show up anywhere. Is it worth starting a meshmode.typing for something like this?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mind that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried that, but between Sphinx not being very helpful and a bunch of extra imports in places.. I went with using optype instead. What do you think?

Updated all the uses in meshmode.mesh and meshmode.mesh.processing to use optype instead and it looks pretty good.

@alexfikl alexfikl force-pushed the mesh-cleanup branch 2 times, most recently from f7df0dd to 102887b Compare January 12, 2026 09:47
@inducer
Copy link
Owner

inducer commented Jan 12, 2026

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants