How to use the fava.util.date.Interval.get function in fava

To help you get started, we’ve selected a few fava examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github beancount / fava / tests / test_util_date.py View on Github external
def test_interval():
    assert Interval.get("month") is Interval.MONTH
    assert Interval.get("year") is Interval.YEAR
    assert Interval.get("YEAR") is Interval.YEAR
    assert Interval.get("asdfasdf") is Interval.MONTH
github beancount / fava / tests / test_util_date.py View on Github external
def test_interval():
    assert Interval.get("month") is Interval.MONTH
    assert Interval.get("year") is Interval.YEAR
    assert Interval.get("YEAR") is Interval.YEAR
    assert Interval.get("asdfasdf") is Interval.MONTH
github beancount / fava / tests / test_util_date.py View on Github external
def test_interval():
    assert Interval.get("month") is Interval.MONTH
    assert Interval.get("year") is Interval.YEAR
    assert Interval.get("YEAR") is Interval.YEAR
    assert Interval.get("asdfasdf") is Interval.MONTH
github beancount / fava / tests / test_util_date.py View on Github external
def test_interval():
    assert Interval.get("month") is Interval.MONTH
    assert Interval.get("year") is Interval.YEAR
    assert Interval.get("YEAR") is Interval.YEAR
    assert Interval.get("asdfasdf") is Interval.MONTH
github beancount / fava / fava / application.py View on Github external
def _pull_beancount_file(_, values):
    g.beancount_file_slug = values.pop("bfile", None) if values else None
    with LOAD_FILE_LOCK:
        if not app.config.get("LEDGERS"):
            _load_file()
    if not g.beancount_file_slug:
        g.beancount_file_slug = app.config["FILE_SLUGS"][0]
    if g.beancount_file_slug not in app.config["FILE_SLUGS"]:
        abort(404)
    g.ledger = app.config["LEDGERS"][g.beancount_file_slug]
    g.conversion = request.args.get("conversion")
    g.partial = request.args.get("partial", False)
    g.interval = Interval.get(
        request.args.get("interval", g.ledger.fava_options["interval"])
    )