Skip to content
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
13 changes: 6 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v6.0.0
hooks:
- id: check-ast
- id: fix-byte-order-marker
Expand All @@ -25,27 +25,26 @@ repos:
- id: pretty-format-json
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: '3.9.2'
rev: '7.3.0'
hooks:
- id: flake8 # Just check that the code is well-formed
additional_dependencies: [jsonschema, python-dateutil, pyexcel-ezodf]
args: [--count, "--select=E9,F63,F7,F82", --show-source, --statistics]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.9.3
rev: v5.10.1
hooks:
- id: isort
args: [--line-length 160]
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 25.12.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v2.26.0
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/asottile/blacken-docs
rev: v1.11.0
rev: 1.20.0
hooks:
- id: blacken-docs
additional_dependencies: [black==20.8b1]
1 change: 1 addition & 0 deletions README.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ While every commit and push is automatically tested as described, sometimes it's
* security check: `bandit -r src`
* reformat code: `black src tests`
* sort imports: `isort .`
* update local pre-commit repos: `pre-commit autoupdate; pre-commit install`
* run pre-commit tests without committing: `pre-commit run --all-files`

Logs are stored in the `log` directory. To generate debug logs, prepend the command line with `LOG_LEVEL=DEBUG`, e.g.:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Privacy-focused, free, powerful crypto tax calculator

**IMPORTANT NOTICE FOR USA TAXPAYERS**: Starting in 2025, the USA has transitioned from [Universal Application to Per-Wallet Application](https://github.com/eprbell/rp2/issues/135#issuecomment-2454959334). Support for Per-Wallet Application in RP2 is still under development — see [issue #135](https://github.com/eprbell/rp2/issues/135). Do not use RP2 for 2025 (and later) USA tax reporting until this issue is fully resolved.

**IMPORTANT NOTICE FOR TAXPAYERS WORLDWIDE**: Support for Per-Wallet Application in RP2 is still in development - see [issue 135 for details](https://github.com/eprbell/rp2/issues/135#issuecomment-2454959334). If your country mandates Per-Wallet Application, do not use RP2 for tax reporting until that issue is resolved. If your country permits Universal Application (already supported by RP2), you may safely use RP2.
**IMPORTANT NOTICE FOR TAXPAYERS WORLDWIDE**: Support for Per-Wallet Application in RP2 is still in development - see [issue 135 for details](https://github.com/eprbell/rp2/issues/135#issuecomment-2454959334). If your country mandates Per-Wallet Application, do not use RP2 for tax reporting until that issue is resolved. If your country permits Universal Application (already supported by RP2), you may safely use RP2.

[![Static Analysis / Main Branch](https://github.com/eprbell/rp2/actions/workflows/static_analysis.yml/badge.svg)](https://github.com/eprbell/rp2/actions/workflows/static_analysis.yml)
[![Documentation Check / Main Branch](https://github.com/eprbell/rp2/actions/workflows/documentation_check.yml/badge.svg)](https://github.com/eprbell/rp2/actions/workflows/documentation_check.yml)
Expand Down
2 changes: 1 addition & 1 deletion docs/output_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ This is a Japan-specific report: tax_report_jp.ods output file contains a legend

The NTA (National Tax Agency) provides an excel spreadsheet for calculating the total average of each crypto asset per year. This report generates a similar report and can be optionally submitted with an individual's taxes or provided to the NTA if requested.

The summary sheet contains the total for the tax year. This is what is normally reported as "miscellaneous income" (雑所得). However, it may be reported as business income in certain circumstances. Please do your own research.
The summary sheet contains the total for the tax year. This is what is normally reported as "miscellaneous income" (雑所得). However, it may be reported as business income in certain circumstances. Please do your own research.
Binary file modified input/golden/generic/test_data2_generic_lofo_rp2_full_report.ods
Binary file not shown.
Binary file modified input/golden/generic/test_data_generic_lofo_rp2_full_report.ods
Binary file not shown.
Binary file not shown.
Binary file modified input/golden/us/test_data2_lofo_rp2_full_report.ods
Binary file not shown.
Binary file modified input/golden/us/test_data_lofo_rp2_full_report.ods
Binary file not shown.
Binary file modified input/golden/us/test_data_lofo_tax_report_us.ods
Binary file not shown.
Binary file modified input/golden/us/test_large_input_lofo_rp2_full_report.ods
Binary file not shown.
Binary file modified input/golden/us/test_large_input_lofo_tax_report_us.ods
Binary file not shown.
Binary file modified input/golden/us/test_many_year_data_lofo_rp2_full_report.ods
Binary file not shown.
Binary file modified input/golden/us/test_many_year_data_lofo_tax_report_us.ods
Binary file not shown.
2 changes: 1 addition & 1 deletion lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ exclude = [
"https://www.reddit.com/.*",
"https://finance.yahoo.com/.*",
"https://www.cointracker.io/.*"
]
]
3 changes: 1 addition & 2 deletions src/rp2/abstract_accounting_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ def seek_non_exhausted_acquired_lot(

if selected_acquired_lot_amount > ZERO and selected_acquired_lot:
lot_candidates.clear_partial_amount(selected_acquired_lot)
if selected_acquired_lot_amount > taxable_event_amount:
self.add_selected_lot_to_heap(lot_candidates.acquired_lot_heap, selected_acquired_lot)
self.add_selected_lot_to_heap(lot_candidates.acquired_lot_heap, selected_acquired_lot)
return AcquiredLotAndAmount(acquired_lot=selected_acquired_lot, amount=selected_acquired_lot_amount)
return None
1 change: 0 additions & 1 deletion src/rp2/locales/en/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -773,4 +773,3 @@ msgstr ""

#~ msgid "Exchange or wallet where balance is held (asset and exchange tab only)"
#~ msgstr ""

1 change: 0 additions & 1 deletion src/rp2/locales/en_IE/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -755,4 +755,3 @@ msgstr ""

msgid "{}_{}"
msgstr ""

1 change: 0 additions & 1 deletion src/rp2/locales/es/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -755,4 +755,3 @@ msgstr "{}_Resumen"

msgid "{}_{}"
msgstr "{}_{}"

1 change: 0 additions & 1 deletion src/rp2/locales/ja/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -755,4 +755,3 @@ msgstr ""

msgid "{}_{}"
msgstr ""

1 change: 0 additions & 1 deletion src/rp2/locales/kl/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -764,4 +764,3 @@ msgstr "__test_{}_{}"

#~ msgid "US dollar value of the fees"
#~ msgstr "__test_US dollar value of the fees"

1 change: 0 additions & 1 deletion src/rp2/locales/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -754,4 +754,3 @@ msgstr ""

msgid "{}_{}"
msgstr ""

Loading