MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / imports_petsc4py

Function imports_petsc4py

python/demo/test.py:16–20  ·  view source on GitHub ↗

Check if a file imports petsc4py.

(f)

Source from the content-addressed store, hash-verified

14
15
16def imports_petsc4py(f):
17 """Check if a file imports petsc4py."""
18 with open(f, encoding="utf-8") as file:
19 read_data = file.read()
20 return "petsc4py" in read_data or ".petsc" in read_data
21
22
23# Get directory of this file

Callers 1

test.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected