community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1867178 - in /comdev/reporter.apache.org/trunk/scripts/rapp: drafts.py kibble.py overview.py whimsy.py
Date Thu, 19 Sep 2019 13:44:15 GMT
Author: sebb
Date: Thu Sep 19 13:44:15 2019
New Revision: 1867178

URL: http://svn.apache.org/viewvc?rev=1867178&view=rev
Log:
pylint: unused items

Modified:
    comdev/reporter.apache.org/trunk/scripts/rapp/drafts.py
    comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py
    comdev/reporter.apache.org/trunk/scripts/rapp/overview.py
    comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py

Modified: comdev/reporter.apache.org/trunk/scripts/rapp/drafts.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/rapp/drafts.py?rev=1867178&r1=1867177&r2=1867178&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/rapp/drafts.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/rapp/drafts.py Thu Sep 19 13:44:15 2019
@@ -4,13 +4,11 @@
 # This is part of a gunicorn app (not intended for standalone use)
 
 import os
-import sys
 import time
 import json
 import re
 import requests
 import pdata
-import committee_info
 import rapp.whimsy
 
 DRAFTS_DIR = '/var/lib/rapp/drafts'
@@ -33,7 +31,7 @@ def index(environ, user):
     if has_access(user, project):
         whence = int(time.time() - (60*86400)) # Max 2 months ago!
         for filename in [x for x in os.listdir(DRAFTS_DIR) if x.startswith(EDITOR_TYPE) and
x.endswith('.draft')]:
-            e, p, t, u = filename.split('-', 3)
+            _e, p, t, u = filename.split('-', 3)
             t = int(t)
             # If a file is way old, try deleting it.
             if t < whence:
@@ -133,7 +131,7 @@ def save(environ, user):
 def forgotten(environ, user):
     """ Query for which TLP reports have drafts but haven't filed to agenda yet """
     which_agenda, aurl = rapp.whimsy.latest_agenda(environ)
-    agenda, cached = rapp.whimsy.get_whimsy(aurl, environ)
+    agenda, _cached = rapp.whimsy.get_whimsy(aurl, environ)
     drafts = sorted([x for x in os.listdir(DRAFTS_DIR) if x.startswith(EDITOR_TYPE) and x.endswith('.draft')])
     lost = {}
     for entry in agenda:
@@ -154,7 +152,7 @@ def forgotten(environ, user):
                     has_draft = False
                     ts = 0
                     for filename in drafts:
-                        e, p, t, u = filename.split('-', 3)
+                        _e, p, t, u = filename.split('-', 3)
                         t = int(t)
                         if p == rid and t > (time.time() - 45*86400):
                             applicables.append(filename)
@@ -162,7 +160,7 @@ def forgotten(environ, user):
                         has_draft = True
                         with open(os.path.join(DRAFTS_DIR, applicables[-1]), "r") as f:
                             last_report = f.read()
-                        e, p, t, u = applicables[-1].split('-', 3)
+                        _e, p, t, u = applicables[-1].split('-', 3)
                         ts = int(t)
                         last_author = u.replace('.draft', '')
                     lost[rid] = {

Modified: comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py?rev=1867178&r1=1867177&r2=1867178&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py Thu Sep 19 13:44:15 2019
@@ -45,7 +45,7 @@ def stats(project, jira = [], mlid = Non
                     "subfilter":"/(?:incubator-)?" + project + ".*\\.git",
                     "distinguish":True
                     }
-                 ).json();
+                 ).json()
         after = [x for x in issues['timeseries'] if x['date'] > BEFORE]
         before = [x for x in issues['timeseries'] if x['date'] <= BEFORE]
         pro_before = 0
@@ -90,7 +90,7 @@ def stats(project, jira = [], mlid = Non
                     "to": int(time.time()),
                     "subfilter":"/(?:incubator-)?" + project + ".*\\.git",
                     }
-                 ).json();
+                 ).json()
         
         # JIRA ??
         jio_before = 0
@@ -109,7 +109,7 @@ def stats(project, jira = [], mlid = Non
                         "interval": "week",
                         "subfilter":"/browse/(" + "|".join(jira) + ")$",
                         }
-                     ).json();
+                     ).json()
             after = [x for x in issues['timeseries'] if x['date'] > BEFORE]
             before = [x for x in issues['timeseries'] if x['date'] <= BEFORE]
         
@@ -140,7 +140,7 @@ def stats(project, jira = [], mlid = Non
                         "to": int(time.time()),
                         "subfilter":"/browse/(" + "|".join(jira) + ")$",
                         }
-                     ).json();
+                     ).json()
             
         
         # Commits
@@ -155,7 +155,7 @@ def stats(project, jira = [], mlid = Non
                     "interval": "week",
                     "subfilter":"/(?:incubator-)?" + project + ".*\\.git",
                     }
-                 ).json();
+                 ).json()
         after = [x for x in commits['timeseries'] if x['date'] > BEFORE]
         before = [x for x in commits['timeseries'] if x['date'] <= BEFORE]
         cmt_before = 0
@@ -195,7 +195,7 @@ def stats(project, jira = [], mlid = Non
                     "interval": "99999d",
                     "subfilter":"/(?:incubator-)?" + project + ".*\\.git",
                     }
-                 ).json();
+                 ).json()
         after = authors_a['timeseries']
         before = authors_b['timeseries']
         cmtp_before = 0
@@ -255,7 +255,7 @@ def stats(project, jira = [], mlid = Non
                     "to": int(time.time()),
                     "subfilter":"(dev|users?)@" + project + "\.apache\.org",
                     }
-                 ).json();
+                 ).json()
         
         js = {
             'prs': {

Modified: comdev/reporter.apache.org/trunk/scripts/rapp/overview.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/rapp/overview.py?rev=1867178&r1=1867177&r2=1867178&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/rapp/overview.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/rapp/overview.py Thu Sep 19 13:44:15 2019
@@ -2,7 +2,6 @@
 # This is part of a gunicorn app (not intended for standalone use)
 
 import os
-import cgi
 import json
 import pdata
 import time
@@ -49,7 +48,7 @@ def run(environ, user):
     
     # Set personalized vars, dump
     if dumps and user:
-        ddata, allpmcs, health = pdata.getProjectData()
+        _ddata, allpmcs, _health = pdata.getProjectData()
         dumps['you'] = committers[user]
         dumps['all'] = sorted(allpmcs)
         dumps['pmcs'] = sorted(groups)

Modified: comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py?rev=1867178&r1=1867177&r2=1867178&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py Thu Sep 19 13:44:15 2019
@@ -3,9 +3,6 @@
 """ script for publishing a report to whimsy """
 # This is part of a gunicorn app (not intended for standalone use)
 
-import os
-import sys
-import time
 import json
 import requests
 import re
@@ -39,7 +36,6 @@ def get_whimsy(url, env, ttl = 14400):
                     ojs = json.load(open(wanted_file))
                 except:
                     ojs = []
-                xjs = []
                 for attachment in js:
                     aa = attachment.get('attach')
                     at = attachment.get('title')
@@ -79,7 +75,7 @@ def get_whimsy(url, env, ttl = 14400):
     return js, cached
 
 def latest_agenda(environ):
-    calendar, cached = get_whimsy(WHIMSY_CALENDAR, environ)
+    calendar, _cached = get_whimsy(WHIMSY_CALENDAR, environ)
     latest = calendar['agendas'][-1]
     ymd = re.match(r"board_agenda_(\d\d\d\d_\d\d_\d\d)\.txt", latest)
     if ymd:
@@ -105,7 +101,7 @@ def guess_title(project):
 
 def agenda_forced(environ, user):
     """ Force whimsy agenda refresh... """
-    txtfile, url = latest_agenda(environ)
+    _txtfile, url = latest_agenda(environ)
     get_whimsy(url, environ, ttl = 0)
     return agenda(environ, user)
 
@@ -113,9 +109,9 @@ def agenda(environ, user):
     """ Returns data on the board report for a project, IF present and/or filed in the current
agenda """
     project = environ.get('QUERY_STRING')
     report = None
-    txtfile, url = latest_agenda(environ)
+    _txtfile, url = latest_agenda(environ)
     if has_access(user, project):
-        agenda, cached = get_whimsy(url, environ, ttl = 3600)
+        agenda, _cached = get_whimsy(url, environ, ttl = 3600)
         for entry in agenda:
             ml = entry.get('mail_list') # mailing list id, usually correct
             rid = entry.get('roster', '').replace('https://whimsy.apache.org/roster/committee/',
'') # ldap id per roster
@@ -123,7 +119,7 @@ def agenda(environ, user):
                 report = entry
                 break
         
-        comments, cached = get_whimsy(WHIMSY_COMMENTS, environ)
+        comments, _cached = get_whimsy(WHIMSY_COMMENTS, environ)
         title = report and report.get('title') or guess_title(project)
         if title in comments:
             comments = comments[title]
@@ -143,8 +139,6 @@ def agenda(environ, user):
         'found': False,
         }
     
-    
-    comments, cached = get_whimsy(WHIMSY_COMMENTS, environ)
 
 def comments(environ, user):
     """ Display board feedback from previous reports ... """
@@ -157,7 +151,6 @@ def comments(environ, user):
     pname = project
     if project in pmcSummary:
         pname = pmcSummary[project]['name'].replace('Apache ', '')
-    cmt = {}
     
     # If we can access, fetch comments
     if comments and pname in comments and has_access(user, project):
@@ -174,7 +167,7 @@ def comments(environ, user):
     return js
 
 
-def publish(environ, user):
+def publish(environ, _user):
     try:
         request_body_size = int(environ.get('CONTENT_LENGTH', 0))
     except (ValueError):



Mime
View raw message