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

Remove unused variables #39

Closed
7 tasks done
brylie opened this issue Aug 29, 2017 · 1 comment
Closed
7 tasks done

Remove unused variables #39

brylie opened this issue Aug 29, 2017 · 1 comment

Comments

@brylie
Copy link
Member

brylie commented Aug 29, 2017

While scanning the project with Flake8 (#33), we received several errors related to unused imports.

Goal

Resolve all Flake8 errors related to unused imports.

Task

The following Flake8 errors should be resolved:

  • ./api/read.py:156:9: F841 local variable 'user_categories' is assigned to but never used
  • ./api/read.py:187:9: F841 local variable 'problems' is assigned to but never used
  • ./api/write.py:17:1: F811 redefinition of unused 'require_post_params' from line 5
  • ./api/write.py:18:1: F811 redefinition of unused 'JsonResponse' from line 4
  • ./api/write.py:19:1: F811 redefinition of unused 'login_required' from line 6
  • ./api/write.py:465:29: F841 local variable 'e' is assigned to but never used
  • ./api/models/civi.py:134:9: F841 local variable 'owner_id' is assigned to but never used
@mdwest mdwest added the ready label Sep 4, 2017
@brylie brylie modified the milestone: 0.1 Sep 7, 2017
@tractaylor tractaylor self-assigned this Sep 9, 2017
tractaylor added a commit that referenced this issue Sep 9, 2017
user_catorgies was used but the code on line 158 was commented out, which made user_catorgies unused, so I commented it out.
problems was used but the code on line 188- was commented out, which made problems unused.
@tractaylor
Copy link
Collaborator

After making the initial changes listed in the Issue, I reran flake and found 2 more F811. Bot are in read.py

./api/read.py:154:9: F841 local variable 'a' is assigned to but never used
./api/read.py:155:9: F841 local variable 'all_categories' is assigned to but never used

I will fix these in this branch as well

tractaylor added a commit that referenced this issue Sep 29, 2017
user_catorgies was used but the code on line 158 was commented out, which made user_catorgies unused, so I commented it out.
problems was used but the code on line 188- was commented out, which made problems unused.
@brylie brylie closed this as completed in c0a761c Oct 4, 2017
brylie added a commit that referenced this issue Oct 4, 2017
@brylie brylie removed the in progress label Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants