osmith submitted this change.

View Change

Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve osmith: Looks good to me, approved; Verified
ruff.toml: new file

Add a ruff.toml config, so "ruff check" can be used in a local
pre-commit hook to find errors like the following. I'll fix them in
follow-up patches. Only checking gen_makefile.py for now as I plan to
modify that in follow-up patches.

gen_makefile.py:147:7: F841 Local variable `l` is assigned to but never used
|
145 | def extend_dict(self, d):
146 | for k,v in d.items():
147 | l = self.extend(k, v)
| ^ F841
148 |
149 | def read_projects_deps(path):
|
= help: Remove assignment to unused variable `l`

Change-Id: If045f3bfc12b333d3426e558294346da83521466
---
A .ruff.toml
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/.ruff.toml b/.ruff.toml
new file mode 100644
index 0000000..64ca401
--- /dev/null
+++ b/.ruff.toml
@@ -0,0 +1,12 @@
+line-length = 120
+exclude = [
+ "cgit/osmo-commit-filter.py",
+ "net/fill_config.py",
+ "net/templates/freeswitch/python/dialplan-dgsm/__init__.py",
+ "osmo-cn-latest/provision-hlr.py",
+ "sysmobts-calib.py",
+]
+
+[lint]
+# E741: Ambiguous variable name: `l`
+ignore = ["E741"]

To view, visit change 39399. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: If045f3bfc12b333d3426e558294346da83521466
Gerrit-Change-Number: 39399
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>