Linted the scanner code with Pylint and corrected most obvious errors and warning.
As I started using VS Code, I wanted to test the pylint option that starts pylint when a file is saved. It output many "problems" in the code and I decided to clean the simplest ones. I thought it would be simple but I had sometimes to change large pieces of code and was not as simple as thought. In the end, that's quite a large pull request...
Here is the summary of the changes:
Unused variable or function parameters
System imports before project imports
No from module import *.
Method should be a function
Access to protected members
Unecessary semicolon
Space after comma
No exception specified
Boolean optimisation
Too many public methods
Dead code elimination
Refactoring of code
Creation of class Metadata to manage metadata functions.
Started adding docstrings to have them displayed in the editor.
Now remain big pieces of code, particularly large methods that must be broken in smaller ones. Also I want to hide protected methods. When I have time, I'll try adding docstring to modules and functions.
Linted the scanner code with Pylint and corrected most obvious errors and warning.
As I started using VS Code, I wanted to test the pylint option that starts pylint when a file is saved. It output many "problems" in the code and I decided to clean the simplest ones. I thought it would be simple but I had sometimes to change large pieces of code and was not as simple as thought. In the end, that's quite a large pull request...
Here is the summary of the changes:
from module import *
.Now remain big pieces of code, particularly large methods that must be broken in smaller ones. Also I want to hide protected methods. When I have time, I'll try adding docstring to modules and functions.