• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FEniCS / ffcx / 20265269927

16 Dec 2025 10:47AM UTC coverage: 84.6% (+0.2%) from 84.44%
20265269927

push

github

web-flow
Backend formatter interface (#806)

* Dispatch in formatters

* Lock down interface on formatter for single capability

* Dispatch on __call__

* More

* Missed one

* implementation.py -> formatter.py

* Add ABC as interface of Formatter

* Fix import

* one more

* Apply suggestions from code review

Co-authored-by: Jørgen Schartum Dokken <dokken@simula.no>

* Fixup syntax

* StatementList as in C formatter

---------

Co-authored-by: Jørgen Schartum Dokken <dokken@simula.no>

159 of 169 new or added lines in 9 files covered. (94.08%)

4164 of 4922 relevant lines covered (84.6%)

0.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/ffcx/codegeneration/interface.py
1
# Copyright (C) 2025 Paul T. Kühner
2
#
3
# This file is part of FFCx. (https://www.fenicsproject.org)
4
#
5
# SPDX-License-Identifier:    LGPL-3.0-or-later
6

7
"""Backend interface declarations."""
8

9
import abc
1✔
10

11
from numpy import typing as npt
1✔
12

13
import ffcx.codegeneration.lnodes as L
1✔
14

15

16
class Formatter(abc.ABC):
1✔
17
    """Formatter interface."""
18

19
    def __init__(self, dtype: npt.DTypeLike) -> None:
1✔
20
        """Create."""
NEW
21
        raise NotImplementedError
×
22

23
    def __call__(self, obj: L.LNode) -> str:
1✔
24
        """Convert L-Node(s) to string representation."""
NEW
25
        raise NotImplementedError
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc