okfn-brasil/perfil-politico

View on GitHub
perfil/middlewares/sqlprint.py

Summary

Maintainability
A
0 mins
Test Coverage

Do not use bare 'except'
Open

        except:
Severity: Minor
Found in perfil/middlewares/sqlprint.py by pep8

When catching exceptions, mention specific exceptions when possible.

Okay: except Exception:
Okay: except BaseException:
E722: except:

Whitespace before ':'
Open

                sql = sql[width - indentation :]
Severity: Minor
Found in perfil/middlewares/sqlprint.py by pep8

Avoid extraneous whitespace.

Avoid extraneous whitespace in these situations:
- Immediately inside parentheses, brackets or braces.
- Immediately before a comma, semicolon, or colon.

Okay: spam(ham[1], {eggs: 2})
E201: spam( ham[1], {eggs: 2})
E201: spam(ham[ 1], {eggs: 2})
E201: spam(ham[1], { eggs: 2})
E202: spam(ham[1], {eggs: 2} )
E202: spam(ham[1 ], {eggs: 2})
E202: spam(ham[1], {eggs: 2 })

E203: if x == 4: print x, y; x, y = y , x
E203: if x == 4: print x, y ; x, y = y, x
E203: if x == 4 : print x, y; x, y = y, x

Do not use bare 'except'
Open

    except:
Severity: Minor
Found in perfil/middlewares/sqlprint.py by pep8

When catching exceptions, mention specific exceptions when possible.

Okay: except Exception:
Okay: except BaseException:
E722: except:

There are no issues that match your filters.

Category
Status