Skip to content

Commit

Permalink
ci: add black to ci (#61)
Browse files Browse the repository at this point in the history
* ci: add black to ci

* chore: black
  • Loading branch information
agritheory authored Mar 5, 2024
1 parent 295db00 commit db5a742
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

black:
needs: [ py_json_merge ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 2

- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Install Black (Frappe)
run: pip install git+https://github.com/frappe/black.git

- name: Run Black (Frappe)
run: black --check .

prettier:
needs: [ py_json_merge ]
runs-on: ubuntu-latest
Expand Down
7 changes: 3 additions & 4 deletions inventory_tools/inventory_tools/overrides/stock_entry.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import frappe
from erpnext.stock.doctype.stock_entry.stock_entry import FinishedGoodError, StockEntry
from frappe import _
from frappe.utils import flt
from erpnext.stock.doctype.stock_entry.stock_entry import FinishedGoodError, StockEntry

from inventory_tools.inventory_tools.overrides.work_order import get_allowance_percentage


Expand Down Expand Up @@ -151,7 +152,7 @@ def get_pending_raw_materials(self, backflush_based_on=None):

return item_dict


@frappe.whitelist()
def get_production_item_if_work_orders_for_required_item_exists(stock_entry_name: str) -> str:
stock_entry = frappe.get_doc("Stock Entry", stock_entry_name)
Expand All @@ -175,5 +176,3 @@ def get_production_item_if_work_orders_for_required_item_exists(stock_entry_name
return production_item

return ""


0 comments on commit db5a742

Please sign in to comment.