Find issues in Python that you’d miss otherwise

DeepSource runs continuous static analysis and helps you find and automatically fix hundreds of quality and security issues.

Pick a repository to start analyzing your code

Use tb[-1] instead of tb[len(tb) - 1] to get the last element

performance

Hardcoded temporary directory

security

hasattr is used to check if the object is callable

bug risk

Special method __add__ should return NotImplemented

anti-pattern
World's best engineering teams use DeepSource
Intel
Mastodon
NASA
Ethereum
Grid.AI
Supplyframe
HeyCar
Fly.io
RudderStack
Okteto

DeepSource is the upgrade you deserve

open-source tools
No need to install or configure anything. Works out of the box.
Covers everything that you get from open-source tools
Run continuously with zero effort
No need to maintain complex config files
commercial tools
4x more issues than any other Python analyzer in the market
Automatically format your code with Transformers
Not just identify, but also fix issues with Autofix
Fewer false positives and lesser noise
74,863,910+ issues detected
107,110+ issues autofixed
14s average analysis time
215,573+ total number of checks

Automatically create pull requests with bug fixes using Autofix

Autofix creates patches with fixes that you can review and merge — all in a couple of clicks.

proceedings.py CHANGED
@@ -18,13 +18,9 @@ def tar_something():
18
18
  if (
19
19
  order.status == STATUS_OK
20
- and (
21
- isinstance(order.type, Wallet)
22
- or isinstance(order.type, Credit)
20
+ and isinstance(order.type, (Wallet, Credit, COD))
23
- or isinstance(order.type, COD)
24
- )
25
21
  and product.stock > 0
26
- and (isinstance(product.price, float) or isinstance(product.price, int))
22
+ and isinstance(product.price, (float, int))
27
23
  ):
28
24
  make_transaction(order, product, merchant)
29
25
  alert_merchant(order, product)
Put your code formatting on autopilot Never break your CI build again. On every commit, DeepSource runs your favourite formatter and makes another commit with the fixes.

Loved by developers who ship good code

I'm a big fan of DeepSource. I reviewed quite a few products to better support our engineers and the quality of problems found was far better than Codacy or Code Climate for our Python backend codebase.
Adam Pietrzycki, Engineering
Free for personal accounts and small teams
After that, DeepSource grows with your team with per-user Team plans.
Unlimited public repositories
Unlimited lines of code analyzed
Unlimited private repositories for individual accounts
1 private repository for teams/organizations
Continuous analysis with GitHub, GitLab, and Bitbucket
3 team members
$0/month Get started for free No credit card required