Skip to content

Commit

Permalink
refactor: Update examples to use better python coding practices.
Browse files Browse the repository at this point in the history
  • Loading branch information
nfelt14 committed Feb 26, 2024
1 parent 1b97e89 commit 8f00658
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 3 additions & 6 deletions examples/source_measure_units/2400/smu_2450_solar_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,9 @@
power = voltage * current
print("Voltage: ", voltage, "Current: ", current, "Power: ", power)

if current > imax:
imax = current
if power > pmax:
pmax = power
if voltage > vmax:
vmax = voltage
imax = max(imax, current)
pmax = max(pmax, power)
vmax = max(vmax, voltage)

if abs(current) < abs(MIN_CURR):
voc = voltage
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ disable = [
"global-statement", # caught by ruff
"line-too-long", # caught by ruff
"locally-disabled", # allowed
"missing-class-docstring", # caught by ruff
"missing-module-docstring", # caught by ruff
"no-member", # caught by pyright
"protected-access", # caught by ruff
"raise-missing-from", # caught by ruff
Expand Down

0 comments on commit 8f00658

Please sign in to comment.