Code review comment for lp:~urbanape/ubuntu-sso-client/initial-darwin-port

Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

Hi, i found that now there are new lint errors:

ubuntu_sso/utils/__init__.py:
    52: [C0103] Invalid name "qss_map" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)

The name of this should be: QSS_MAP.

Also, i would change this:

if sys.platform in ('win32', 'darwin'):
    from ubuntu_sso.utils import qtwisted as source
    qss_map = {'win32': ':/windows.qss',
               'darwin': ':/darwin.qss',
               }
    source.PLATFORM_QSS = qss_map[sys.platform]
else:
    from ubuntu_sso.utils import linux as source
PLATFORM_QSS = source.PLATFORM_QSS

For:

QSS_MAP = dict(win32=':/windows.qss',
               darwin=':/darwin.qss',
               linux=':/linux.qss')

# Setting linux (fox example) as default if we don't find the
# platform as a key in the dictionary
PLATFORM_QSS = QSS_MAP.get(sys.platform, ":/linux.qss")

review: Needs Fixing

« Back to merge proposal