)
def get_statement_name(self, signature):
- return "{}.{}.{}".format(domainname, "statement", signature)
+ return f"{domainname}.statement.{signature}"
def add_statement(self, signature, tags, short, short_node, lineno):
"""
No visible effect.
"""
name = self.get_statement_name(signature)
- anchor = "{}-statement-{}".format(domainname, signature)
+ anchor = f"{domainname}-statement-{signature}"
new = {
"tags": tags,
[tool.pylint.main]
ignore-paths = [
".git",
+ # Temporary directories created by the system test runner
+ # (see bin/tests/system/conftest.py:system_test_dir)
+ "bin/tests/system/.*_tmp_.*/",
"bin/tests/system/vulture_ignore_list.py",
"contrib",
"dangerfile.py",
- "doc",
+ "doc/arm/conf.py",
+ "doc/man/conf.py",
]
-ignore-patterns = [
- "^.*_tmp_.*\\.py$",
+
+# Both `init-hook` and `source-roots` are needed to avoid import errors,
+# enable plugin loading and calling pylint from CI as `pylint $(git ls-files '*.py')`
+init-hook = "import sys; sys.path.extend(('bin/tests/system', 'doc/misc', 'doc/arm/_ext'));"
+source-roots = [
+ "bin/tests/system",
+ "doc/misc",
+ "doc/arm/_ext",
]
-init-hook = "import sys; sys.path.append('bin/tests/system')"
load-plugins = [
"re_compile_checker",
]
-source-roots = [
- "bin/tests/system/",
-]
[tool.vulture]
paths = [
"bin/tests/system/vulture_ignore_list.py",
"contrib",
"dangerfile.py",
- "doc",
+ "doc/arm/conf.py",
+ "doc/man/conf.py",
]