When I have multiple .py files, I can use pylint --enable=duplicate-code to check for duplicate code between different files. But how can I check if there is duplicate code within one single Python file?
(See this Github issue for instance, https://github.com/PyCQA/pylint/issues/2697)