Skip to content

Commit 0e85f07

Browse files
sbryngelsonclaude
andcommitted
Replace pylint + autopep8 with ruff for Python linting and formatting
- Replace autopep8 with ruff format, pylint with ruff check - Add ruff.toml config at repo root (E, F, W, I, PL rule sets) - Enable ruff check --fix in format.sh and lint.sh for safe auto-fixes - Remove all ~229 inline pylint: disable comments - Fix code violations: E731 (lambda), E741 (ambiguous var), E721 (type comparison), PLW1641 (hash), PLR1722 (sys.exit), F541 (f-string), E501 (line length), E702 (semicolons), PLW2901 (loop var overwrite) - Add ~12 noqa comments for intentional global statements (PLW0603/PLW0602) - Remove 8 zero-violation rules from ignore list to keep config minimal - Fix lint.sh symlink path resolution breaking ruff config discovery - Replace pylint and autopep8 deps with ruff in pyproject.toml Resolves #1281 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent edff972 commit 0e85f07

File tree

156 files changed

+4001
-4015
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+4001
-4015
lines changed

benchmarks/5eq_rk3_weno3_hllc/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# - weno_order : 3
77
# - riemann_solver : 2
88

9+
import argparse
910
import json
1011
import math
11-
import argparse
1212

1313
parser = argparse.ArgumentParser(prog="Benchmarking Case 1", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1414

benchmarks/hypo_hll/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# - hypoelasticity : T
55
# - riemann_solver : 1
66

7+
import argparse
78
import json
89
import math
9-
import argparse
1010

1111
parser = argparse.ArgumentParser(prog="Benchmarkin Case 3", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1212

benchmarks/ibm/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# Additional Benchmarked Features
44
# - ibm : T
55

6+
import argparse
67
import json
78
import math
8-
import argparse
99

1010
parser = argparse.ArgumentParser(prog="Benchmarking Case 4", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1111

benchmarks/igr/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# - viscous : T
66
# - igr_order : 5
77

8+
import argparse
89
import json
910
import math
10-
import argparse
1111

1212
parser = argparse.ArgumentParser(prog="Benchmarking Case 5", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1313

benchmarks/viscous_weno5_sgb_acoustic/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
# - bubble_model : 3
99
# - acoustic_source : T
1010

11+
import argparse
1112
import json
1213
import math
13-
import argparse
1414

1515
parser = argparse.ArgumentParser(prog="Benchmarking Case 2", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1616

examples/0D_bubblecollapse_adap/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
2-
import math
32
import json
3+
import math
44

55
# FLUID PROPERTIES
66
# Water

examples/1D_bubblescreen/case.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
2-
import math
32
import json
3+
import math
44

55
# FLUID PROPERTIES
66
R_uni = 8314.0 # [J/kmol/K]
@@ -53,7 +53,6 @@
5353
u0 = math.sqrt(p0 / rho0) # [m/s]
5454
t0 = x0 / u0 # [s]
5555

56-
#
5756
cfl = 0.1
5857
Nx = 100
5958
Ldomain = 20.0e-03

examples/1D_convergence/case.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
2-
import math
3-
import json
42
import argparse
3+
import json
4+
import math
55

66
# Parsing command line arguments
77
parser = argparse.ArgumentParser(description="Generate JSON case configuration for two-fluid convergence simulation.")
@@ -67,10 +67,10 @@
6767
"patch_icpp(1)%length_x": 1.0,
6868
"patch_icpp(1)%vel(1)": 1.0,
6969
"patch_icpp(1)%pres": 1.0,
70-
"patch_icpp(1)%alpha_rho(1)": f"0.5 - 0.5*sin(2*pi*x)",
71-
"patch_icpp(1)%alpha(1)": f"0.5 - 0.5*sin(2*pi*x)",
72-
"patch_icpp(1)%alpha_rho(2)": f"0.5 + 0.5*sin(2*pi*x)",
73-
"patch_icpp(1)%alpha(2)": f"0.5 + 0.5*sin(2*pi*x)",
70+
"patch_icpp(1)%alpha_rho(1)": "0.5 - 0.5*sin(2*pi*x)",
71+
"patch_icpp(1)%alpha(1)": "0.5 - 0.5*sin(2*pi*x)",
72+
"patch_icpp(1)%alpha_rho(2)": "0.5 + 0.5*sin(2*pi*x)",
73+
"patch_icpp(1)%alpha(2)": "0.5 + 0.5*sin(2*pi*x)",
7474
# Fluids Physical Parameters
7575
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
7676
"fluid_pp(1)%pi_inf": 0.0,

examples/1D_exp_bubscreen/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
2-
import math
32
import json
3+
import math
44

55
# FLUID PROPERTIES
66
R_uni = 8314.0 # [J/kmol/K]

examples/1D_exp_tube_phasechange/case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
2-
import math
3-
import json
42
import argparse
3+
import json
4+
import math
55

66
parser = argparse.ArgumentParser(prog="phasechange", description="phase change considering both 5 and 6 equation models.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
77
parser.add_argument("--mfc", type=json.loads, default="{}", metavar="DICT", help="MFC's toolchain's internal state.")

0 commit comments

Comments
 (0)