Administrator approval is now required for registering new accounts. If you are registering a new account, and are external to the University, please ask the repository owner to contact ServiceLine to request your account be approved. Repository owners must include the newly registered email address, and specific repository in the request for approval.

Commit e805754a authored by Ed Rogers's avatar Ed Rogers
Browse files

Minor uodates - remove old code and add typing hints

parent 33549d09
......@@ -43,30 +43,7 @@ class TestThread(QtCore.QThread):
def __del__(self):
self.wait()
# def _get_top_post(self, subreddit):
# """
# Return a pre-formatted string with top post title, author,
# and subreddit name from the subreddit passed as the only required
# argument.
#
# :param subreddit: A valid subreddit name
# :type subreddit: str
# :return: A string with top post title, author,
# and subreddit name from that subreddit.
# :rtype: str
# """
# url = "https://www.reddit.com/r/{}.json?limit=1".format(subreddit)
# headers = {'User-Agent': 'nikolak@outlook.com tutorial code'}
# request = urllib2.Request(url, headers=headers)
# response = urllib2.urlopen(request)
# data = json.load(response)
# top_post = data['data']['children'][0]['data']
# return "'{title}' by {author} in {subreddit}".format(**top_post)
def run(self):
"""
"""
for _ in range(5):
volume = random.random()
freq = random.choice(list(self.library.freqs))
......@@ -109,7 +86,7 @@ class HelloWindow(QMainWindow):
else:
self.record_key_press(event)
def record_key_press(self, event):
def record_key_press(self, event: QtGui.QKeyEvent):
self.log.append('Key {} pressed at {}'.format(event.key(), time.clock()))
def run_test(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment