Skip to content

Commit

Permalink
[openfl.experimental] Add scripts for lint and format
Browse files Browse the repository at this point in the history
Signed-off-by: Shah, Karan <[email protected]>
  • Loading branch information
MasterSkepticista committed May 30, 2024
1 parent 5e3af9b commit f23f7a1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tool.black]
line-length = 80

[tool.isort]
profile = "black"
force_single_line = "False"
line_length = 80
11 changes: 11 additions & 0 deletions shell/format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -Eeuo pipefail

base_dir=$(dirname $(dirname $0))

# TODO: @karansh1 Apply across all modules
isort --sp "${base_dir}/pyproject.toml" openfl/experimental

black --config "${base_dir}/pyproject.toml" openfl/experimental

flake8 --config "${base_dir}/setup.cfg" openfl/experimental
11 changes: 11 additions & 0 deletions shell/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -Eeuo pipefail

base_dir=$(dirname $(dirname $0))

# TODO: @karansh1 Apply across all modules
isort --sp "${base_dir}/pyproject.toml" --check openfl/experimental

black --config "${base_dir}/pyproject.toml" --check openfl/experimental

flake8 --config "${base_dir}/setup.cfg" openfl/experimental

0 comments on commit f23f7a1

Please sign in to comment.