Issues¶
pynumgeo.issue
¶
Issues reported by the reader and the validator.
Examples:
>>> i = Issue("NG-MESH-001", "error", "node labels must be 1..n", location="model.inp:3")
>>> str(i)
'NG-MESH-001 error model.inp:3 node labels must be 1..n'
>>> i.as_dict()["severity"]
'error'
Issue(id, severity, message, location=None, keyword=None, source=None)
dataclass
¶
One finding.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
rule id, e.g. |
severity |
Severity
|
|
message |
str
|
what is wrong and what to do. |
location |
str | None
|
|
keyword |
str | None
|
the keyword concerned, if any. |
source |
str | None
|
solver source location of the behaviour the rule mirrors ( |
as_dict()
¶
Plain dict (for --json output).
has_errors(issues)
¶
True if any issue has severity error.