Skip to content

Commit

Permalink
Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows (#…
Browse files Browse the repository at this point in the history
…237)

* Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v2...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Upgrade the following action versions: (#238)

* upload-artifact v2
* download-artifact v4.1.7
* upload-artifact v4
* cache v4
* setup-node v4
* setup-python v5

Other changes:
* limit beancount version to below 3
* type hinting to pass pytest

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eugeniu Plamadeala <[email protected]>
  • Loading branch information
dependabot[bot] and Zburatorul authored Sep 21, 2024
1 parent c2c4c55 commit 23944c6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Build


on: [push, pull_request]

jobs:
Expand All @@ -15,22 +16,22 @@ jobs:
- '3.9'
- '3.10'
node-version:
- '15.x'
- '18.x'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
# Need full history to determine version number.
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ matrix.node-version }}-node_modules-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -50,7 +51,7 @@ jobs:
- name: Build wheel
run: python setup.py bdist_wheel
- name: Upload wheels as artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ runner.os == 'Linux' && matrix.python-version == '3.9' }}
with:
name: python-packages
Expand All @@ -65,7 +66,7 @@ jobs:
needs:
- tox
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: python-packages
path: dist
Expand Down
7 changes: 4 additions & 3 deletions beancount_import/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def search_postings(self,
negate=False) -> Iterable[SearchPosting]:
# Prepare postings for searching
postings_date_currency = collections.defaultdict(list)

for mp in mps:
weight = get_posting_weight(mp.posting)
if weight is None:
Expand Down Expand Up @@ -1489,8 +1489,9 @@ def get_combined_transactions(txns: Tuple[Transaction, Transaction],
for match_sets in itertools.product(*match_groups.values()):
combined_matches = sum((match_set.matches for match_set in match_sets),
[]) # type: PostingMatches
combined_removals = sum((match_set.removals
for match_set in match_sets), ())
combined_removals: MatchablePostings = tuple(removal
for match_set in match_sets
for removal in match_set.removals)
if not combined_matches:
continue
for m in combined_matches:
Expand Down
4 changes: 2 additions & 2 deletions beancount_import/source/amazon_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
|
+-> returns Order
"""
from typing import NamedTuple, Optional, List, Union, Iterable, Dict, Sequence, cast
from typing import NamedTuple, Optional, List, Union, Iterable, Dict, Sequence, cast, Type
from abc import ABC, abstractmethod
import collections
import re
Expand Down Expand Up @@ -293,7 +293,7 @@ def parse_date(date_str) -> datetime.date:
return dateutil.parser.parse(date_str, parserinfo=Locale_de_DE._parserinfo(dayfirst=True)).date()


LOCALES = {x.LOCALE: x for x in [Locale_en_US, Locale_de_DE]}
LOCALES: Dict[str, Type[Locale_Data]] = {x.LOCALE: x for x in [Locale_en_US, Locale_de_DE]}

Errors = List[str]
Adjustment = NamedTuple('Adjustment', [
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def run(self):
python_requires='>=3.8',
setup_requires=['setuptools_scm>=5.0.2'],
install_requires=[
'beancount>=2.1.3',
'beancount<3',
'tornado',
'numpy',
'scipy',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ deps =
typing-extensions

commands =
mypy beancount_import --install-types --non-interactive
mypy beancount_import --install-types --non-interactive --disable-error-code=type-abstract
coverage run -m pytest -vv

0 comments on commit 23944c6

Please sign in to comment.