osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-dev/+/39399?usp=email )
Change subject: ruff.toml: new file
......................................................................
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(-)
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
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
https://gerrit.osmocom.org/c/osmo-dev/+/39399?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
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(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>