Changes:
1. Fix bridge check if file does not exist
2. Renamed for grammatical fixes
3. Logic improvement for unnecessary "else" in if clause
4. Inlining where sensible for return values
5. Init lists with [] rather than list()
6. Simplify if/else statements to return sooner when further logic not needed
7. Use or instead of if/else where possible
8. Using Walrus operator to improve readability where possible (requires Python 3.8+, but this is defined as such in setup.py already)
9. Typos
10. Remove unnecessary initialisations of objects
11. Assignments that then had a break in the for loop and then returned simplified to simply return inside the loop
12. Some type-hint fixes for multiple allowed types
13. Fix missing role attributes matching
14. Migrate .format to f-strings
Thanks for contributing by jsa34