Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Code Quality Issues #52

Closed
wants to merge 5 commits into from
Closed

Conversation

HarshCasper
Copy link

Description

  • Fixed the use of hasattr
  • Fixed unnecessary use of getattr
  • Fixed method with no argument
  • Fixed multiple import name
  • Add .deepsource.toml

I ran a DeepSource Analysis on my fork of this repository. You can see all the issues raised by DeepSource here.

DeepSource helps you to automatically find and fix issues in your code during code reviews. This tool looks for anti-patterns, bug risks, performance problems, and raises issues. There are plenty of other issues in relation to Bug Discovery and Anti-Patterns which you would be interested to take a look at.

If you do not want to use DeepSource to continuously analyze this repo, I'll remove the .deepsource.toml from this PR and you can merge the rest of the fixes. If you want to setup DeepSource for Continuous Analysis, I can help you set that up.

@ionelmc
Copy link
Owner

ionelmc commented Mar 22, 2021

Please don't touch the tests, callable(something) is not the same as hasattr(something, '__call__'). The later invokes descriptor protocol while callable just does a super optimized and incorrect slot check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants