launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05109
[Merge] lp:~jtv/launchpad/minilint-2 into lp:launchpad
Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/minilint-2 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~jtv/launchpad/minilint-2/+merge/77193
= Summary =
Fixing small bits of lint that have been lying around in devel.
= Launchpad lint =
One item of lint remains; this to our knowledge can't be avoided.
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/hardwaredb/doc/hwdb-device-tables.txt
lib/lp/registry/browser/announcement.py
lib/lp/registry/model/person.py
cronscripts/foaf-update-karma-cache.py
lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.js
./cronscripts/foaf-update-karma-cache.py
8: '_pythonpath' imported but unused
--
https://code.launchpad.net/~jtv/launchpad/minilint-2/+merge/77193
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/minilint-2 into lp:launchpad.
=== modified file 'cronscripts/foaf-update-karma-cache.py'
--- cronscripts/foaf-update-karma-cache.py 2011-09-26 07:21:53 +0000
+++ cronscripts/foaf-update-karma-cache.py 2011-09-27 16:29:32 +0000
@@ -178,7 +178,8 @@
INSERT INTO KarmaCache
(person, category, karmavalue, product, distribution,
sourcepackagename, project)
- SELECT person, NULL, SUM(karmavalue), NULL, distribution, NULL, NULL
+ SELECT
+ person, NULL, SUM(karmavalue), NULL, distribution, NULL, NULL
FROM KarmaCache
WHERE distribution IS NOT NULL
GROUP BY person, distribution
@@ -198,7 +199,8 @@
GROUP BY person, Product.project
""")
- # - All actions with a specific category of a person on a given project
+ # - All actions with a specific category of a person on a given
+ # project.
# IMPORTANT: This has to be the latest step; otherwise the rows
# inserted here will be included in the calculation of the overall
# karma of a person on a given project.
@@ -261,7 +263,7 @@
at C_add_summed_totals to see how the summed entries are generated.
"""
(person_id, category_id, product_id, distribution_id, points) = entry
- points *= scaling[category_id] # Scaled. wow.
+ points *= scaling[category_id] # Scaled. wow.
self.logger.debug("Setting person_id=%d, category_id=%d, points=%d"
% (person_id, category_id, points))
=== modified file 'lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.js'
--- lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.js 2011-09-27 04:34:36 +0000
+++ lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.js 2011-09-27 16:29:32 +0000
@@ -609,7 +609,7 @@
var cancel_btn = warning.one('.cancel-btn');
cancel_btn.simulate('click');
// The warning is gone.
- var warning = overlay.one('.private-bug-warning');
+ warning = overlay.one('.private-bug-warning');
Y.Assert.isNull(warning);
},
=== modified file 'lib/lp/hardwaredb/doc/hwdb-device-tables.txt'
--- lib/lp/hardwaredb/doc/hwdb-device-tables.txt 2011-09-24 11:38:34 +0000
+++ lib/lp/hardwaredb/doc/hwdb-device-tables.txt 2011-09-27 16:29:32 +0000
@@ -1,10 +1,12 @@
-= Hardware Database Device Tables =
+Hardware Database Device Tables
+===============================
These tables represent devices and complete systems in the database. They
allow look up of devices by their bus IDs and by their human readable
vendor and product names. They also link devices to drivers.
-== HWVendorName ==
+HWVendorName
+------------
HWVendorName is a simple list of vendor names. A new entry is created by
IHWVendorNameSet.create().
@@ -144,7 +146,8 @@
None
-== HWVendorID ==
+HWVendorID
+----------
HWVendorID associates a bus, as enumerated by HWBus, with a bus-specific
vendor ID and a vendor name. We store the IDs as a string, because not all
@@ -467,7 +470,8 @@
PCI 0x8086
-== HWDevice ==
+HWDevice
+--------
A HWDevice instance stores core data about a hardware device: The bus
it can connect to, the vendor ID, the product ID, the human readable
@@ -711,7 +715,8 @@
ParameterError: '12345678901234567' is not a valid product ID for SCSI
-=== Unknown Vendor IDs ===
+Unknown Vendor IDs
+..................
If IHWDevice.create is called with a vendor ID that for which there
is no IHWVendorID record, the latter is automatically created. Since
@@ -735,7 +740,9 @@
>>> print new_vendor_device.bus_vendor.vendor_name.name
Unknown
-=== Device Variants ===
+
+Device Variants
+...............
While most devices can be uniquely identified by their vendor and product
IDs, there are some cases, where different devices have identical IDs:
@@ -843,7 +850,8 @@
<BLANKLINE>
>>> LaunchpadZopelessLayer.txn.abort()
-=== Retrieving HWDevice records ===
+Retrieving HWDevice records
+...........................
Existing HWDevice records can be retrieved by calling
HWDeviceSet.getByDeviceID()
@@ -1122,7 +1130,8 @@
linux-image-2.6.24-19-generic ahci
-== HWDeviceNameVariant ==
+HWDeviceNameVariant
+-------------------
Many OEM products are sold by more than one vendor under different
product names; some manufacturers sell the same device under
@@ -1168,7 +1177,8 @@
>>> LaunchpadZopelessLayer.txn.abort()
-== HWDriver ==
+HWDriver
+--------
If a device is reported as having problems, then we are more
interested in which drivers are involved rather than the fact that
@@ -1465,7 +1475,8 @@
>>> LaunchpadZopelessLayer.switchDbUser('hwdb-submission-processor')
-== Driver names and package names ==
+Driver names and package names
+------------------------------
The same driver names can appear multiple times in HWDriver.
HWDriverSet.all_driver_names() returns a list of distinct driver
@@ -1502,7 +1513,8 @@
>>> LaunchpadZopelessLayer.switchDbUser('hwdb-submission-processor')
-== HWDeviceDriverLink ==
+HWDeviceDriverLink
+------------------
This table links devices and drivers.
@@ -1643,7 +1655,8 @@
None
-== HWDeviceClass ==
+HWDeviceClass
+-------------
This table specifies the class or classes of a device. A device class
describes the capabilities of a device, i.e, if it is a printer,
@@ -1711,7 +1724,8 @@
>>> LaunchpadZopelessLayer.switchDbUser('hwdb-submission-processor')
-== HWSubmissionDevice ==
+HWSubmissionDevice
+------------------
This table links devices listed in a submission to the
HWDeviceDriverLink table. Additionally it links a device of a
@@ -1850,7 +1864,8 @@
None
-== Statistical functions ==
+Statistical functions
+---------------------
HWSubmissionDeviceSet.numDevicesInSubmissions() returns how often a
device appears in HWDB submissions.
@@ -2266,7 +2281,8 @@
(0L, 2L)
-== Relations between bugs and HWDB submissions ==
+Relations between bugs and HWDB submissions
+-------------------------------------------
We can query which owners of a device, or which people owning a device
controlled by a given driver, are related to a set of bugs. We must
@@ -2456,7 +2472,8 @@
Sample Person
-=== Searching for drivers instead of devices ===
+Searching for drivers instead of devices
+........................................
We can also look for people using a given driver and being affected by a
bug.
=== modified file 'lib/lp/registry/browser/announcement.py'
--- lib/lp/registry/browser/announcement.py 2011-09-26 06:30:07 +0000
+++ lib/lp/registry/browser/announcement.py 2011-09-27 16:29:32 +0000
@@ -159,8 +159,7 @@
title=data.get('title'),
summary=data.get('summary'),
url=data.get('url'),
- publication_date = data.get('publication_date')
- )
+ publication_date=data.get('publication_date'))
self.next_url = canonical_url(self.context)
@property
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py 2011-09-25 00:36:26 +0000
+++ lib/lp/registry/model/person.py 2011-09-27 16:29:32 +0000
@@ -4683,7 +4683,8 @@
if person.preferredemail:
return [person]
elif person.is_team:
- # Get transitive members of a team that does not itself have a preferred email.
+ # Get transitive members of a team that does not itself have a
+ # preferred email.
return _get_recipients_for_team(person)
else:
return []