Skip to content

Commit be5a61b

Browse files
More localized disable for broad-except in Pylinter
1 parent 577f260 commit be5a61b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pylint/lint/pylinter.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
33

4-
# pylint: disable=broad-except
5-
64
import collections
75
import contextlib
86
import functools
@@ -1050,7 +1048,7 @@ def get_ast(self, filepath, modname, data=None):
10501048
)
10511049
except astroid.AstroidBuildingException as ex:
10521050
self.add_message("parse-error", args=ex)
1053-
except Exception as ex:
1051+
except Exception as ex: # pylint: disable=broad-except
10541052
traceback.print_exc()
10551053
self.add_message("astroid-error", args=(ex.__class__, ex))
10561054

@@ -1161,7 +1159,7 @@ def _report_evaluation(self):
11611159
evaluation = self.config.evaluation
11621160
try:
11631161
note = eval(evaluation, {}, self.stats) # pylint: disable=eval-used
1164-
except Exception as ex:
1162+
except Exception as ex: # pylint: disable=broad-except
11651163
msg = "An exception occurred while rating: %s" % ex
11661164
else:
11671165
self.stats["global_note"] = note

0 commit comments

Comments
 (0)