Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 23, 2023
1 parent 802aa29 commit 893e0a9
Show file tree
Hide file tree
Showing 62 changed files with 64 additions and 4 deletions.
1 change: 1 addition & 0 deletions _build_backend.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Build backend that also compiles translations and frontend."""

# pylint: disable=wildcard-import,function-redefined,unused-wildcard-import

from __future__ import annotations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""fava wsgi application"""

from __future__ import annotations

from fava.application import create_app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""fava wsgi application"""

from __future__ import annotations

from fava.application import create_app
Expand Down
1 change: 1 addition & 0 deletions docs/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
sphinx-apidoc is not customizeable enough to do this.
"""

from __future__ import annotations

import pkgutil
Expand Down
1 change: 1 addition & 0 deletions src/fava/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fava - A web interface for Beancount."""

from __future__ import annotations

from contextlib import suppress
Expand Down
1 change: 1 addition & 0 deletions src/fava/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
app.run('localhost', 5000)
"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions src/fava/beans/abc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Abstract base classes for Beancount types."""

from __future__ import annotations

from abc import ABC
Expand Down
1 change: 1 addition & 0 deletions src/fava/beans/account.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Account name helpers."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 0 additions & 1 deletion src/fava/beans/create.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Helpers to create entries."""


from __future__ import annotations

from decimal import Decimal
Expand Down
1 change: 1 addition & 0 deletions src/fava/beans/flags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Beancount entry flags."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/fava/beans/funcs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Various functions to deal with Beancount data."""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions src/fava/beans/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helpers for Beancount entries."""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions src/fava/beans/load.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Load Beancount files and strings."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/fava/beans/prices.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Price helpers."""

from __future__ import annotations

import datetime
Expand Down
1 change: 1 addition & 0 deletions src/fava/beans/str.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Convert Beancount types to string."""

from __future__ import annotations

from decimal import Decimal
Expand Down
1 change: 1 addition & 0 deletions src/fava/beans/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Typing helpers."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/fava/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The command-line interface for Fava."""

from __future__ import annotations

import errno
Expand Down
1 change: 1 addition & 0 deletions src/fava/context.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Specify types for the flask application context."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module provides the data required by Fava's reports."""

from __future__ import annotations

from datetime import date
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/accounts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Account close date and metadata."""

from __future__ import annotations

import datetime
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/attributes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Attributes for auto-completion."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/budgets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Parsing and computing budgets."""

from __future__ import annotations

from collections import Counter
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/charts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provide data suitable for Fava's charts."""

from __future__ import annotations

from collections import defaultdict
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/commodities.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Attributes for auto-completion."""

from __future__ import annotations

from contextlib import suppress
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
All functions in this module will be automatically added as template filters.
"""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/documents.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Document path related helpers."""

from __future__ import annotations

from os import altsep
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/extensions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fava extensions."""

from __future__ import annotations

from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/fava_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
parsing the options.
"""

from __future__ import annotations

import re
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Reading/writing Beancount files."""

from __future__ import annotations

import re
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/filters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Entry filters."""

from __future__ import annotations

import re
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/group_entries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Entries grouped by type."""

from __future__ import annotations

from collections import defaultdict
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/ingest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Ingest helper functions."""

from __future__ import annotations

import datetime
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/inventory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Alternative implementation of Beancount's Inventory."""

from __future__ import annotations

from decimal import Decimal
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/misc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Some miscellaneous reports."""

from __future__ import annotations

import datetime
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/module_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base class for the "modules" of FavaLedger."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/number.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Formatting numbers."""

from __future__ import annotations

import copy
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/query_shell.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""For using the Beancount shell from Fava."""

from __future__ import annotations

import contextlib
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/tree.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Account balance trees."""

from __future__ import annotations

from collections import defaultdict
Expand Down
1 change: 1 addition & 0 deletions src/fava/core/watcher.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A simple file and folder watcher."""

from __future__ import annotations

from os import walk
Expand Down
7 changes: 4 additions & 3 deletions src/fava/ext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fava's extension system."""

from __future__ import annotations

import ast
Expand Down Expand Up @@ -158,9 +159,9 @@ def find_extensions(


def extension_endpoint(
func_or_endpoint_name: Callable[[FavaExtensionBase], Any]
| str
| None = None,
func_or_endpoint_name: (
Callable[[FavaExtensionBase], Any] | str | None
) = None,
methods: list[str] | None = None,
) -> (
Callable[[FavaExtensionBase], Response]
Expand Down
1 change: 1 addition & 0 deletions src/fava/ext/auto_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This mainly serves as an example how Fava's extension systems, which only
really does hooks at the moment, works.
"""

from __future__ import annotations

from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions src/fava/ext/portfolio_list/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This is a simple example of Fava's extension reports system.
"""

from __future__ import annotations

import re
Expand Down
1 change: 1 addition & 0 deletions src/fava/help/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""List of all available help pages."""

from __future__ import annotations

HELP_PAGES = {
Expand Down
1 change: 1 addition & 0 deletions src/fava/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Exceptions and module base class."""

from __future__ import annotations

from typing import NamedTuple
Expand Down
1 change: 1 addition & 0 deletions src/fava/internal_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
this part of the functionality to be tested and allowing some end-to-end tests
for the frontend data validation.
"""

from __future__ import annotations

from copy import copy
Expand Down
1 change: 1 addition & 0 deletions src/fava/json_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This module contains the url endpoints of the JSON API that is used by the web
interface for asynchronous functionality.
"""

from __future__ import annotations

import shutil
Expand Down
1 change: 1 addition & 0 deletions src/fava/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""Some Beancount plugins."""

from __future__ import annotations
1 change: 1 addition & 0 deletions src/fava/plugins/link_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
associate them to Document entries. For transactions, it then also adds a link
from the transaction to documents, as well as the "#linked" tag.
"""

from __future__ import annotations

from collections import defaultdict
Expand Down
1 change: 1 addition & 0 deletions src/fava/plugins/tag_discovered_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
It looks through all Document entries that were added by Beancount
automatically through file discovery and adds the tag "#discovered".
"""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/fava/serialisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
This is not intended to work well enough for full roundtrips yet.
"""

from __future__ import annotations

import datetime
Expand Down
1 change: 1 addition & 0 deletions src/fava/template_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

All functions in this module will be automatically added as template filters.
"""

from __future__ import annotations

from decimal import Decimal
Expand Down
1 change: 1 addition & 0 deletions src/fava/util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Some small utility functions."""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions src/fava/util/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Date ranges are always tuples (start, end) from the (inclusive) start date
to the (exclusive) end date.
"""

from __future__ import annotations

import datetime
Expand Down
1 change: 1 addition & 0 deletions src/fava/util/excel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Writing query results to CSV and spreadsheet documents."""

from __future__ import annotations

import csv
Expand Down
1 change: 1 addition & 0 deletions src/fava/util/ranking.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Ranking utilities."""

from __future__ import annotations

import math
Expand Down
1 change: 1 addition & 0 deletions src/fava/util/sets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utils for Python sets."""

from __future__ import annotations

from typing import AbstractSet
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test fixtures."""

# pylint: disable=redefined-outer-name
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions tests/data/import_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test importer for Fava."""

from __future__ import annotations

import csv
Expand Down
1 change: 1 addition & 0 deletions tests/test_application.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for Fava's main Flask app."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions tests/test_core_budgets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fava's budget syntax."""

from __future__ import annotations

from datetime import date
Expand Down
Loading

0 comments on commit 893e0a9

Please sign in to comment.