Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.130
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
pylint /
extensions /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
0
B
-rw-r--r--
_check_docs_utils.py
22.14
KB
-rw-r--r--
bad_builtin.py
2.38
KB
-rw-r--r--
check_docs.py
784
B
-rw-r--r--
check_elif.py
2.35
KB
-rw-r--r--
comparetozero.py
2.33
KB
-rw-r--r--
docparams.py
18.63
KB
-rw-r--r--
docstyle.py
2.84
KB
-rw-r--r--
emptystring.py
2.42
KB
-rw-r--r--
mccabe.py
6.06
KB
-rw-r--r--
overlapping_exceptions.py
3.23
KB
-rw-r--r--
redefined_variable_type.py
4.11
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : overlapping_exceptions.py
# -*- coding: utf-8 -*- # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Looks for overlapping exceptions.""" import astroid from pylint import interfaces from pylint import checkers from pylint.checkers import utils from pylint.checkers.exceptions import _annotated_unpack_infer class OverlappingExceptionsChecker(checkers.BaseChecker): """Checks for two or more exceptions in the same exception handler clause that are identical or parts of the same inheritance hierarchy (i.e. overlapping).""" __implements__ = interfaces.IAstroidChecker name = "overlap-except" msgs = { "W0714": ( "Overlapping exceptions (%s)", "overlapping-except", "Used when exceptions in handler overlap or are identical", ) } priority = -2 options = () @utils.check_messages("overlapping-except") def visit_tryexcept(self, node): """check for empty except""" for handler in node.handlers: if handler.type is None: continue if isinstance(handler.type, astroid.BoolOp): continue try: excs = list(_annotated_unpack_infer(handler.type)) except astroid.InferenceError: continue handled_in_clause = [] for part, exc in excs: if exc is astroid.Uninferable: continue if isinstance(exc, astroid.Instance) and utils.inherit_from_std_ex(exc): # pylint: disable=protected-access exc = exc._proxied if not isinstance(exc, astroid.ClassDef): continue exc_ancestors = [ anc for anc in exc.ancestors() if isinstance(anc, astroid.ClassDef) ] for prev_part, prev_exc in handled_in_clause: prev_exc_ancestors = [ anc for anc in prev_exc.ancestors() if isinstance(anc, astroid.ClassDef) ] if exc == prev_exc: self.add_message( "overlapping-except", node=handler.type, args="%s and %s are the same" % (prev_part.as_string(), part.as_string()), ) elif prev_exc in exc_ancestors or exc in prev_exc_ancestors: ancestor = part if exc in prev_exc_ancestors else prev_part descendant = part if prev_exc in exc_ancestors else prev_part self.add_message( "overlapping-except", node=handler.type, args="%s is an ancestor class of %s" % (ancestor.as_string(), descendant.as_string()), ) handled_in_clause += [(part, exc)] def register(linter): """Required method to auto register this checker.""" linter.register_checker(OverlappingExceptionsChecker(linter))
Close