Skip to content

Commit

Permalink
.coafile: Add PyPluralNamingBear
Browse files Browse the repository at this point in the history
Closes #163
  • Loading branch information
virresh committed Jul 17, 2018
1 parent c188a0a commit 7e5cd64
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .coafile
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@ ignore += .coafile, *requirements.txt, .travis.yml, LICENSE, .moban.yaml, .moban
bears = KeywordBear
language = python 3
keywords = coala

[all.plural]
bears = PyPluralNamingBear
files = **.py
ignore_list = LOGGING, MIDDLEWARE
10 changes: 5 additions & 5 deletions gci/students.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,20 @@ def get_students():
for _, instance in get_instances().items():
student_id = instance['student_id']
if student_id not in students:
student = {
student_data = {
'id': student_id,
'display_name': instance['student_display_name'],
'organization_id': instance['organization_id'],
'organization_name': instance['organization_name'],
'program_year': instance['program_year'],
'instances': [],
}
students[student_id] = student
yield student
students[student_id] = student_data
yield student_data
else:
student = students[student_id]
student_data = students[student_id]

student['instances'].append(instance)
student_data['instances'].append(instance)


def get_issue_related_students():
Expand Down
12 changes: 6 additions & 6 deletions inactive_issues/inactive_issues_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ def run(issues):
for j in issues:
issue_no = j.number
events = j.get_events()
myevent = []
myevent_list = []
data = []
for i in events:
myevent.append(str(i.event))
myevent_list.append(str(i.event))
for i in events:
if i.commit_id is not None:
data.append(str(i.created_at))
for i, myevents in reversed(list(enumerate(myevent))):
for i, myevents in reversed(list(enumerate(myevent_list))):
if myevents == 'unassigned':
break
elif myevents == 'assigned':
Expand Down Expand Up @@ -56,10 +56,10 @@ def inactive_issues_json(request):
issues = repo.get_issues()
issues_list = []
for myissue in issues:
label = []
labels = []
for mylabel in myissue.labels:
label.append(mylabel.name)
if 'status/blocked' not in label:
labels.append(mylabel.name)
if 'status/blocked' not in labels:
if myissue.state == 'open' and myissue.pull_request is None:
issues_list.append(myissue)

Expand Down
6 changes: 3 additions & 3 deletions openhub/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

def get_data(for_what):
n = 100
data1 = []
data_list = []
logger = logging.getLogger(__name__)
for i in range(1, n):
import_url = ('https://www.openhub.net/orgs/'
Expand Down Expand Up @@ -51,5 +51,5 @@ def get_data(for_what):
except Exception as ex:
logger.error(ex)
break
data1 = data1 + data
return data1
data_list = data_list + data
return data_list
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coala-bears
moban
git+https://gitlab.com/virresh/coala-antlr.git

0 comments on commit 7e5cd64

Please sign in to comment.