This problem happens during the write to the CSV. There are various results that are gathered during the query for the existence of a given site, and they are always expected to exist in the results dictionary. However, if a given user name has an illegal format for a given site, then the query is not even attempted. Which leaves some keys in the dictionary undefined.
The solution is to define these keys even in the case where the username has an illegal format.
This was the original intent for this class, but there was no test to ensure that the sites listed did not have their detection method changed. Now, the test will fail if it does not really cover a given category.
On the flake8 test selection, this PR does _not_ focus on "_style violations_" (the majority of flake8 error codes that [__python/black__](https://github.com/python/black) can autocorrect). Instead these tests are focus on runtime safety and correctness:
* E9 tests are about Python syntax errors usually raised because flake8 can not build an Abstract Syntax Tree (AST). Often these issues are a sign of unused code or code that has not been ported to Python 3. These would be compile-time errors in a compiled language but in a dynamic language like Python they result in the script halting/crashing on the user.
* F63 tests are usually about the confusion between identity and equality in Python. Use ==/!= to compare str, bytes, and int literals is the classic case. These are areas where __a == b__ is True but __a is b__ is False (or vice versa).
* F7 tests logic errors and syntax errors in type hints
* F82 tests are almost always _undefined names_ which are usually a sign of a typo, missing imports, or code that has not been ported to Python 3. These also would be compile-time errors in a compiled language but in Python a __NameError__ is raised which will halt/crash the script on the user.