Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre commit #108

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand Down Expand Up @@ -37,13 +37,13 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
args:
- --py310-plus
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
rev: v2.3.1
hooks:
- id: autoflake
- repo: https://github.com/asottile/reorder_python_imports
Expand All @@ -55,11 +55,11 @@ repos:
hooks:
- id: yesqa
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
rev: v2.13.0
hooks:
- id: pretty-format-yaml
exclude: |
Expand Down
1 change: 1 addition & 0 deletions bany/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Command line scripts for dealing with budgets.
"""

import logging
from functools import partial
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/extract/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Parse an input file and create transactions in YNAB.
"""

import pathlib
import re
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/extract/extractors/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Extract transactions from a file.
"""

import dataclasses
import pathlib
from collections.abc import Iterator
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/extract/extractors/pdf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Extract transactions from a PDF file using regular expressions.
"""

import dataclasses
import logging
import pathlib
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/extract/rules.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Rules for extraction information from a PDF.
"""

import calendar
import itertools
import pathlib
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Parse an input file and create transactions in YNAB.
"""

from pathlib import Path

import networkx as nx
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/network/algo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Methods for creating a graph representation of the problem.
"""

import copy
import functools
import inspect
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/network/attrs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
The data associated with each node or column when representing the problem.
"""

import dataclasses
import typing
from functools import partial
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/network/loader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Methods for loading input into a DataFrame.
"""

import logging
import os
import re
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/network/validate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Methods for creating a graph representation of the problem.
"""

import logging

import networkx as nx
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/network/visualize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Methods for creating a graph representation of the problem.
"""

import dataclasses
import io

Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/solvers/basesolver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A base class for solutions to the bucket problem.
"""

import dataclasses

from bany.cmd.solve.solvers.bucketdata import BucketData
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/solvers/bucketdata.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Data structures for solvers for the bucket problem.
"""

import dataclasses
import logging

Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/solvers/constrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Solve the bucket problem, but do not allow moving values between buckets.
In this version of the problem, we can only add to buckets and an optimal solution may not exist.
"""

import dataclasses
import logging
import typing
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/solvers/graphsolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
├─1 level=[1] results_value=[ 1,250.00] results_ratio=[0.250] amount_to_add=[ 250.00]
└─2 level=[1] results_value=[ 1,250.00] results_ratio=[0.250] amount_to_add=[ 250.00]
"""

import copy
import typing
from collections.abc import Callable
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/solvers/montecarlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
In this version of the problem, we can only add to buckets and an optimal solution may not exist.
This solution uses Monte Carlo and may not offer the optimal allocation of amounts into buckets, but gets close.
"""

import dataclasses

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/solve/solvers/unconstrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Solve the bucket problem, allowing amounts to be removed from existing buckets.
This is a pretty straight forward solution and places no major constrains on the problem.
"""

import dataclasses

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/split/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Itemize and split a receipt between people.
"""

import functools
import re
import sys
Expand Down
1 change: 1 addition & 0 deletions bany/cmd/split/splitter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A class to managed split expenses.
"""

import dataclasses
import functools
import itertools
Expand Down
1 change: 1 addition & 0 deletions bany/core/cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This module defines a decorator for caching the results of an API call.
"""

import functools
import itertools
import pathlib
Expand Down
1 change: 1 addition & 0 deletions bany/core/money.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Helper functions for Money.
"""

import decimal
import itertools

Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/cookbook.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit test utilities.
"""

import logging

import networkx as nx
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/network/test_algo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import logging
import typing

Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/network/test_attrs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import dataclasses

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/network/test_loader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import builtins
import io
import textwrap
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/network/test_validate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import unittest.mock

import networkx as nx
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/network/test_visualize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import logging

import networkx as nx
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/solvers/test_basesolver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import pytest

import bany.cmd.solve.solvers.basesolver
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/solvers/test_bucketdata.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import logging

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/solvers/test_constrained.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/solvers/test_graphsolver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import logging

import networkx as nx
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/solvers/test_montecarlo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/solve/solvers/test_unconstrained.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import logging

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions tests/bany/cmd/split/test_splitter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import dataclasses
import logging

Expand Down
1 change: 1 addition & 0 deletions tests/bany/core/test_money.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for module.
"""

import pytest

import bany.core.money
Expand Down
Loading