fix: full-repo ruff lint cleanup and CI migration to uv
Resolve all 374 ruff errors across 36 Python files (E501, E702, E722, E741, F821, F841, invalid-syntax) bringing `ruff check .` to zero errors repo-wide with line-length=100. Rewrite CI workflow to use uv for dependency management, whole-repo `ruff check .`, py_compile syntax gate, and merged python-tests job. Add pyproject.toml with ruff config and uv dependency groups. CI structure proposed by hcm444.
This commit is contained in:
@@ -221,7 +221,10 @@ class RadarCalculatorGUI:
|
||||
temp = self.get_float_value(self.entries["Temperature (K):"])
|
||||
|
||||
# Validate inputs
|
||||
if None in [f_ghz, pulse_duration_us, prf, p_dbm, g_dbi, sens_dbm, rcs, losses_db, nf_db, temp]:
|
||||
if None in [
|
||||
f_ghz, pulse_duration_us, prf, p_dbm, g_dbi,
|
||||
sens_dbm, rcs, losses_db, nf_db, temp,
|
||||
]:
|
||||
messagebox.showerror("Error", "Please enter valid numeric values for all fields")
|
||||
return
|
||||
|
||||
@@ -235,7 +238,7 @@ class RadarCalculatorGUI:
|
||||
g_linear = 10 ** (g_dbi / 10)
|
||||
sens_linear = 10 ** ((sens_dbm - 30) / 10)
|
||||
losses_linear = 10 ** (losses_db / 10)
|
||||
nf_linear = 10 ** (nf_db / 10)
|
||||
_nf_linear = 10 ** (nf_db / 10)
|
||||
|
||||
# Calculate receiver noise power
|
||||
if k is None:
|
||||
@@ -298,11 +301,14 @@ class RadarCalculatorGUI:
|
||||
messagebox.showinfo("Success", "Calculation completed successfully!")
|
||||
|
||||
except Exception as e:
|
||||
messagebox.showerror("Calculation Error", f"An error occurred during calculation:\n{str(e)}")
|
||||
messagebox.showerror(
|
||||
"Calculation Error",
|
||||
f"An error occurred during calculation:\n{str(e)}",
|
||||
)
|
||||
|
||||
def main():
|
||||
root = tk.Tk()
|
||||
app = RadarCalculatorGUI(root)
|
||||
_app = RadarCalculatorGUI(root)
|
||||
root.mainloop()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user