~racb/git-ubuntu:modernize-scripts-review

Last commit made on 2017-11-08
Get this branch:
git clone -b modernize-scripts-review https://git.launchpad.net/~racb/git-ubuntu
Only Robie Basak can upload to this branch. If you are Robie Basak please log in for upload directions.

Branch merges

Branch information

Name:
modernize-scripts-review
Repository:
lp:~racb/git-ubuntu

Recent commits

06a731e... by Robie Basak

Drop spphr_timestamp

This function is no longer used.

f196701... by Robie Basak

Drop num_imported_pkgs

I don't feel that this needs to be defined. The number is only used
once, and the other test is a simple test for non-zero.

fe41e55... by Robie Basak

Assert timestamp fields as they are read in

This helps with readability of the subsequent code and also validates
the incoming data as early as possible (so I can worry less about
malicious injection, etc).

50395de... by Robie Basak

str(lpobj.self_link) -> str(lpobj)

According to
https://help.launchpad.net/API/launchpadlib#Persistent_references_to_Launchpad_objects,
str(lpobj) is sufficient.

323c424... by Robie Basak

Timestamp-related changes

I do three things here. Feel free to pick and choose the ones you agree
with.

1) Use a Timestamp tuple instead of a dict with well-known elements.
This better represents the datatype, but also saves us a few characters
in accessing members which is convenient to fix all the lines where we
go over the 79 pep8 limit.

2) Define a "timestamp" inside the dist_name loop. This also helps with
the 79 character pep8 limit.

3) Rename the "timestamp" attribute to "time". This matches
"time.time()" but also helps with that pesky 79 character pep8 limit.

This fixes most of the cases where we go beyond 79 characters while
keeping everything just as easy to read (IMHO).

da138b8... by Robie Basak

I believe it's idomatic to not use brackets here

bc5f483... by Robie Basak

Fold into one line

50c1663... by Robie Basak

Some additional comments to help follow the code

5b79487... by Nish Aravamudan

scripts: update based upon review commennts

This will get squashed up.

8d00a2c... by Nish Aravamudan

scripts: clean up some pylint3 messages