Skip to content

Commit ceef66c

Browse files
authored
precommit: make sure isort output is compatible with black (BLAST-WarpX#3981)
* make sure isort output good for black
1 parent f6cda9a commit ceef66c

File tree

4 files changed

+38
-12
lines changed

4 files changed

+38
-12
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ indent_size = unset
3636
# isort config
3737
force_sort_within_sections = true
3838
known_first_party = amrex,impactx,picmistandard,pywarpx,warpx
39+
# same as the "black" multi-line import style
40+
multi_line_output = 3
41+
include_trailing_comma = True

Examples/Tests/laser_injection_from_file/analysis_from_RZ_file.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,10 @@ def launch_analysis(executable):
148148
def main() :
149149

150150
from lasy.laser import Laser
151-
from lasy.profiles import (CombinedLongitudinalTransverseProfile,
152-
GaussianProfile)
151+
from lasy.profiles import (
152+
CombinedLongitudinalTransverseProfile,
153+
GaussianProfile,
154+
)
153155
from lasy.profiles.longitudinal import GaussianLongitudinalProfile
154156
from lasy.profiles.transverse import LaguerreGaussianTransverseProfile
155157

Tools/LibEnsemble/run_libensemble_on_warpx.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@
4343
import all_machine_specs
4444
from libensemble import libE_logger
4545
from libensemble.executors.mpi_executor import MPIExecutor
46-
from libensemble.tools import (add_unique_random_streams, parse_args,
47-
save_libE_output)
46+
from libensemble.tools import (
47+
add_unique_random_streams,
48+
parse_args,
49+
save_libE_output,
50+
)
4851

4952
# Import machine-specific run parameters
5053
if machine == 'local':

Tools/PerformanceTests/run_automated.py

+26-8
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,41 @@
1313
import sys
1414
import time
1515

16-
from functions_perftest import (extract_dataframe, get_file_content,
17-
run_batch_nnode, store_git_hash)
16+
from functions_perftest import (
17+
extract_dataframe,
18+
get_file_content,
19+
run_batch_nnode,
20+
store_git_hash,
21+
)
1822
import git
1923
import pandas as pd
2024

2125
# Get name of supercomputer and import configuration functions from
2226
# machine-specific file
2327
if os.getenv("LMOD_SYSTEM_NAME") == 'summit':
2428
machine = 'summit'
25-
from summit import (executable_name, get_batch_string, get_config_command,
26-
get_run_string, get_submit_job_command, get_test_list,
27-
process_analysis, time_min)
29+
from summit import (
30+
executable_name,
31+
get_batch_string,
32+
get_config_command,
33+
get_run_string,
34+
get_submit_job_command,
35+
get_test_list,
36+
process_analysis,
37+
time_min,
38+
)
2839
if os.getenv("NERSC_HOST") == 'cori':
2940
machine = 'cori'
30-
from cori import (executable_name, get_batch_string, get_config_command,
31-
get_run_string, get_submit_job_command, get_test_list,
32-
process_analysis, time_min)
41+
from cori import (
42+
executable_name,
43+
get_batch_string,
44+
get_config_command,
45+
get_run_string,
46+
get_submit_job_command,
47+
get_test_list,
48+
process_analysis,
49+
time_min,
50+
)
3351

3452
# typical use: python run_automated.py --n_node_list='1,8,16,32' --automated
3553
# Assume warpx, picsar, amrex and perf_logs repos ar in the same directory and

0 commit comments

Comments
 (0)