Found some potential code quality issues in peewee
I was reading peewee's documentation last month and so I thought of forking this repo and running a code quality analysis on it.
In that analysis, [DeepSource](https://deepsource.io/) found somewhat around 1000 code quality issues.

Some interesting issues found in the source code:
- [(Bug-risk) Multiple imports for an import name detected](https://deepsource.io/gh/pnijhara/peewee/issue/PYL-W0404/)
- [(Bug-risk) `hasattr` used to check if the object is callable](https://deepsource.io/gh/pnijhara/peewee/issue/PTC-W0035/)
- [(Performance) Built-in function `len` used as a condition](https://deepsource.io/gh/pnijhara/peewee/issue/PYL-C1801/)
- [(Security) Assert statement used outside of tests](https://deepsource.io/gh/pnijhara/peewee/issue/BAN-B101/)

What's so good?
All the above-stated issues can be automatically fixed by autofix tool of DeepSource. Look at this autofix session &rarr; https://deepsource.io/gh/pnijhara/peewee/autofix/54d8d678-156a-4aa1-aea3-9fb63ebe4f89/ and the [PR](https://github.com/pnijhara/peewee/pull/3)

> Code that conforms stylistically with the rest of the Peewee codebase.

Quoting from peewee's documentation

Since there is no coding style followed in the project, I decided to run a Transformer as well. Since the last release, DeepSource can automatically do that and create a PR on the project.

-  [ Automated transformation](https://deepsource.io/gh/pnijhara/peewee/transform/34b7ba8d-23af-456f-bcd7-b36f7cd97713/) using Black, and [the subsequent PR](https://github.com/pnijhara/peewee/pull/1).

Please let me know what issues you'd like to focus on fixing and I'd be happy to take a look into it. Also, you can choose to hide certain types of issues too (if you wish to ignore them or you believe it is a false positive). I'd also be happy to send a patch with the DeepSource configuration file with the required fixes.

You can find the required configuration file for DeepSource [here](https://github.com/pnijhara/peewee/blob/pnijhara-patch-1/.deepsource.toml).
