Skip to content

Commit

Permalink
formatting workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Grudic committed Sep 25, 2024
1 parent b4b0663 commit c140d20
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: black-action
on: [push, pull_request]
jobs:
linter_name:
name: runner / black formatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rickstaa/action-black@v1
with:
black_args: "-l 119 ."
2 changes: 1 addition & 1 deletion src/pytreegrav/bruteforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def PotentialTarget_bruteforce(
for i in prange(x_target.shape[0]):
for j in range(x_source.shape[ 0]):
for k in range(3):
dx[k] = x_target [i, k] - x_source[j, k]
dx[k] = x_target [i, k] - x_source[j, k]
r = sqrt(dx[0] * dx[0] + dx[1] * dx[1] + dx[2] * dx[2])

h = max(softening_source[j], softening_target[i])
Expand Down

0 comments on commit c140d20

Please sign in to comment.