"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pylint/message/_deleted_message_ids.py" between
pylint-2.14.1.tar.gz and pylint-2.14.2.tar.gz

About: pylint analyzes Python source code looking for bugs and signs of poor quality.

_deleted_message_ids.py  (pylint-2.14.1):_deleted_message_ids.py  (pylint-2.14.2)
skipping to change at line 125 skipping to change at line 125
DeletedMessage("R0922", "abstract-class-little-used"), DeletedMessage("R0922", "abstract-class-little-used"),
DeletedMessage("W0142", "star-args"), DeletedMessage("W0142", "star-args"),
], ],
"https://github.com/PyCQA/pylint/issues/2409": [ "https://github.com/PyCQA/pylint/issues/2409": [
DeletedMessage("W0232", "no-init"), DeletedMessage("W0232", "no-init"),
], ],
"https://github.com/PyCQA/pylint/pull/6421": [ "https://github.com/PyCQA/pylint/pull/6421": [
DeletedMessage("W0111", "assign-to-new-keyword"), DeletedMessage("W0111", "assign-to-new-keyword"),
], ],
} }
MOVED_TO_EXTENSIONS = {
"https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-che
ckers": [
DeletedMessage("R0201", "no-self-use")
],
}
@lru_cache(maxsize=None) @lru_cache(maxsize=None)
def is_deleted_symbol(symbol: str) -> str | None: def is_deleted_symbol(symbol: str) -> str | None:
"""Return the explanation for removal if the message was removed.""" """Return the explanation for removal if the message was removed."""
for explanation, deleted_messages in DELETED_MESSAGES_IDS.items(): for explanation, deleted_messages in DELETED_MESSAGES_IDS.items():
for deleted_message in deleted_messages: for deleted_message in deleted_messages:
if symbol == deleted_message.symbol or any( if symbol == deleted_message.symbol or any(
symbol == m[1] for m in deleted_message.old_names symbol == m[1] for m in deleted_message.old_names
): ):
return explanation return explanation
skipping to change at line 147 skipping to change at line 152
@lru_cache(maxsize=None) @lru_cache(maxsize=None)
def is_deleted_msgid(msgid: str) -> str | None: def is_deleted_msgid(msgid: str) -> str | None:
"""Return the explanation for removal if the message was removed.""" """Return the explanation for removal if the message was removed."""
for explanation, deleted_messages in DELETED_MESSAGES_IDS.items(): for explanation, deleted_messages in DELETED_MESSAGES_IDS.items():
for deleted_message in deleted_messages: for deleted_message in deleted_messages:
if msgid == deleted_message.msgid or any( if msgid == deleted_message.msgid or any(
msgid == m[0] for m in deleted_message.old_names msgid == m[0] for m in deleted_message.old_names
): ):
return explanation return explanation
return None return None
@lru_cache(maxsize=None)
def is_moved_symbol(symbol: str) -> str | None:
"""Return the explanation for moving if the message was moved to extensions.
"""
for explanation, moved_messages in MOVED_TO_EXTENSIONS.items():
for moved_message in moved_messages:
if symbol == moved_message.symbol or any(
symbol == m[1] for m in moved_message.old_names
):
return explanation
return None
@lru_cache(maxsize=None)
def is_moved_msgid(msgid: str) -> str | None:
"""Return the explanation for moving if the message was moved to extensions.
"""
for explanation, moved_messages in MOVED_TO_EXTENSIONS.items():
for moved_message in moved_messages:
if msgid == moved_message.msgid or any(
msgid == m[0] for m in moved_message.old_names
):
return explanation
return None
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)