]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: add another directory to search path for pylint
authorChristian Hopps <chopps@labn.net>
Mon, 24 Mar 2025 05:07:28 +0000 (05:07 +0000)
committerChristian Hopps <chopps@labn.net>
Mon, 24 Mar 2025 05:10:36 +0000 (05:10 +0000)
Some IDEs (e.g., emacs+lsp) run pylint from the root directory and so
we need to add `tests/topotests` so that `lib` and `munet` are found
by pylint when used in imports

Signed-off-by: Christian Hopps <chopps@labn.net>
.pylintrc

index ba9430ba6b37a105169fdfa33df4eb0f5b70dc4f..c829d45127d820a41bce9a7125afa3d5cefa4a90 100644 (file)
--- a/.pylintrc
+++ b/.pylintrc
@@ -1,5 +1,5 @@
 [MASTER]
-init-hook="import sys; sys.path.insert(0, '..')"
+init-hook="import sys; sys.path.extend(['..', 'tests/topotests']);"
 signature-mutators=common_config.retry,retry
 
 [FORMAT]