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

Added PyUnusedCodeBear to .coafile #582

Merged
merged 1 commit into from
Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .coafile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ default_actions = *: ApplyPatchAction

bears += KeywordBear
keywords = pdb
bears += PyUnusedCodeBear

[all.autopep8]
bears = PEP8Bear, PycodestyleBear
Expand Down
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
Expand Down Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

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

@Man-Jain don't make changes to answers/* and push your commit again. I am not sure, but this might work.

Copy link
Member

Choose a reason for hiding this comment

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

^Ignore

if start in graph and end in graph:
for path in networkx.algorithms.all_shortest_paths(
graph, start, end):
Expand Down
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
Expand Down
2 changes: 0 additions & 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
Expand Down Expand Up @@ -110,7 +109,6 @@ 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()

bears = client.list.bears.get().json()
bears = [{**{'name': bear}, **content}
Expand Down
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
Expand Down
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
Expand Down
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
Expand Down
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
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion tests/git_stats_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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

Expand Down
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
Expand Down