summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pylint/lint/message_state_handler.py2
-rw-r--r--pylintrc4
2 files changed, 5 insertions, 1 deletions
diff --git a/pylint/lint/message_state_handler.py b/pylint/lint/message_state_handler.py
index 4cd40e276..7c81c2c86 100644
--- a/pylint/lint/message_state_handler.py
+++ b/pylint/lint/message_state_handler.py
@@ -361,7 +361,7 @@ class _MessageStateHandler:
match = OPTION_PO.search(content)
if match is None:
continue
- try:
+ try: # pylint: disable = too-many-try-statements
for pragma_repr in parse_pragma(match.group(2)):
if pragma_repr.action in {"disable-all", "skip-file"}:
if pragma_repr.action == "disable-all":
diff --git a/pylintrc b/pylintrc
index cf0ee89bf..0f0dcfd4b 100644
--- a/pylintrc
+++ b/pylintrc
@@ -32,6 +32,7 @@ load-plugins=
pylint.extensions.typing,
pylint.extensions.redefined_variable_type,
pylint.extensions.comparison_placement,
+ pylint.extensions.broad_try_clause,
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
@@ -444,6 +445,9 @@ max-public-methods=25
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
+# Maximum number of statements in a try-block
+max-try-statements = 14
+
# List of regular expressions of class ancestor names to
# ignore when counting public methods (see R0903).
exclude-too-few-public-methods=