Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.coafile: Added the PyUnusedCodeBear to the file
Browse files Browse the repository at this point in the history
Added the PyUnusedCodeBear to the .coafile and ran coala command. This
bear will remove the unused code from the project files. The bear is
added to the [all.python] section.

Fixes coala#531
Man-Jain committed Jul 16, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 861f7f8 commit 76cc206
Showing 11 changed files with 4 additions and 16 deletions.
1 change: 1 addition & 0 deletions .coafile
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ default_actions = *: ApplyPatchAction

bears += KeywordBear
keywords = pdb
bears += PyUnusedCodeBear

[all.autopep8]
bears = PEP8Bear, PycodestyleBear
3 changes: 0 additions & 3 deletions answers/final.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from collections import OrderedDict, Counter
import logging

from gensim.parsing.preprocessing import STOPWORDS
from gensim.utils import simple_preprocess
@@ -60,9 +59,7 @@ def get_answer(question, graph, final=False):

grapheize(q_graph, q_doc, attrs={'q_type': q_type})
scores = Counter()
found_common = False
for start, end in q_graph.edges():
found_common = True
if start in graph and end in graph:
for path in networkx.algorithms.all_shortest_paths(
graph, start, end):
2 changes: 0 additions & 2 deletions answers/service.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import json
import os

from flask import Flask, jsonify, request
from gensim.summarization import summarize
3 changes: 1 addition & 2 deletions plugins/coatils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from collections import OrderedDict
import json
import os
import textwrap

import requests
@@ -110,7 +109,7 @@ def ls(self, msg, match):
Example: `ls bears python python3`
"""
langs = list(map(lambda x: x.lower(), match.group(1).split()))
all_langs = Coatils.all_langs()
Coatils.all_langs()

bears = client.list.bears.get().json()
bears = [{**{'name': bear}, **content}
1 change: 0 additions & 1 deletion plugins/explain.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import re
import glob
import os.path

from errbot import BotPlugin, re_botcmd
from errbot.templating import tenv
1 change: 0 additions & 1 deletion plugins/labhub.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import datetime
import json
import os
import re
import time
1 change: 0 additions & 1 deletion tests/answer_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import unittest
import logging

from errbot.backends.test import FullStackTest
3 changes: 1 addition & 2 deletions tests/coatils_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import unittest
import queue

from errbot.backends.test import FullStackTest
@@ -88,7 +87,7 @@ def test_run_coala(self):

# ensuring that only one result is yielded
with self.assertRaises(queue.Empty):
next_msg = self.pop_message()
self.pop_message()
# error
self.push_message('!run a b\n```\nc\n```')
self.assertEqual(self.pop_message(),
2 changes: 1 addition & 1 deletion tests/git_stats_test.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
from tempfile import mkdtemp
from errbot import BotPlugin
import unittest
from unittest.mock import Mock, MagicMock, create_autospec, PropertyMock, patch
from unittest.mock import create_autospec

from IGitt.GitHub.GitHubMergeRequest import GitHubMergeRequest
from IGitt.GitLab.GitLabMergeRequest import GitLabMergeRequest
2 changes: 0 additions & 2 deletions tests/labhub_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import logging
import os
import queue
import textwrap
import time
import unittest
from unittest.mock import Mock, MagicMock, create_autospec, PropertyMock, patch

1 change: 0 additions & 1 deletion tests/wolfram_alpha_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import unittest
import logging

import vcr

0 comments on commit 76cc206

Please sign in to comment.