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

Static analysis improvements python #3263

Merged
merged 5 commits into from
Jan 19, 2021

Conversation

datumbox
Copy link
Contributor

  • Simplify expressions and logic
  • Remove unused vars.
  • Remove unnecessary parenthesis.

My IDE gets all the credit. :D

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @datumbox. Looks good !

We should add your IDE to the contributors list :)

@datumbox datumbox merged commit f7fae49 into pytorch:master Jan 19, 2021
@datumbox datumbox deleted the refactor/remove_unused_vars branch January 19, 2021 12:56
num_blocks = 0
for m in self.inner_blocks:
num_blocks += 1
num_blocks = len(self.inner_blocks)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, great to see that this is already supported by torchscript :-)

facebook-github-bot pushed a commit that referenced this pull request Jan 21, 2021
Summary:
* Simplify code and remove used vars.

* Simplify expressions and remove used parenthesis.

* Jit fixes.

* Making check more readable.

* fixing styles

Reviewed By: datumbox

Differential Revision: D25954566

fbshipit-source-id: 7ae7966e3c9b91e1f93b42e1c1a8f93cfef19643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants