Merge lp:~dobey/ubuntuone-client/lint-fixes into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 1395
Merged at revision: 1395
Proposed branch: lp:~dobey/ubuntuone-client/lint-fixes
Merge into: lp:ubuntuone-client
Diff against target: 198 lines (+5/-144)
3 files modified
Makefile.am (+4/-12)
pylintrc (+0/-127)
ubuntuone/platform/__init__.py (+1/-5)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/lint-fixes
Reviewer Review Type Date Requested Status
Mike McCracken (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+166258@code.launchpad.net

Commit message

Remove the pylintrc as we don't need it any longer.
Ignore the pyinotify_agnostic.py when running lint checks.
Don't re-export tools/credentials in the same namespace.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) :
review: Approve
Revision history for this message
Mike McCracken (mikemc) wrote :

this doesn't appear to break any new tests on osx, and it's nice to get rid of those imports in platform

thanks for cleaning things up!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2013-02-21 20:59:11 +0000
3+++ Makefile.am 2013-05-29 13:51:24 +0000
4@@ -38,18 +38,11 @@
5 -e 's|\@SSO_PING_URL\@|$(SSO_PING_URL)|g' \
6 -e 's|\@VERSION\@|$(VERSION)|g' < $< > $@
7
8-pylintrc: Makefile
9- if test "x$(builddir)" != "x$(srcdir)"; then \
10- if [ ! -e pylintrc -a ! -h pylintrc ]; then \
11- $(LN_S) $(srcdir)/pylintrc; \
12- fi; \
13- fi
14-
15 logging.conf: data/logging.conf.in Makefile
16 $(MAKE) -C data logging.conf
17
18-lint: pylintrc $(clientdefs_DATA) Makefile
19- PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" USE_PYFLAKES="true" u1lint
20+lint: $(clientdefs_DATA) Makefile
21+ PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" USE_PYFLAKES="true" u1lint -i ubuntuone/platform/filesystem_notifications/pyinotify_agnostic.py
22
23 test: logging.conf $(clientdefs_DATA) Makefile
24 echo "$(PYTHONPATH)"
25@@ -90,7 +83,7 @@
26 (cd tests && $(LNDIR) $(srcdir)/../tests > /dev/null); \
27 fi
28
29-all-local: pylintrc logging.conf $(clientdefs_DATA)
30+all-local: logging.conf $(clientdefs_DATA)
31
32 sd_path = ubuntuone/syncdaemon
33
34@@ -141,8 +134,7 @@
35 VERSION \
36 bin \
37 contrib \
38- tests \
39- pylintrc
40+ tests
41
42 CLEANFILES = \
43 $(clientdefs_DATA)
44
45=== removed file 'pylintrc'
46--- pylintrc 2012-05-14 20:38:23 +0000
47+++ pylintrc 1970-01-01 00:00:00 +0000
48@@ -1,127 +0,0 @@
49-# lint Python modules using external checkers.
50-#
51-# This is the main checker controling the other ones and the reports
52-# generation. It is itself both a raw checker and an astng checker in order
53-# to:
54-# * handle message activation / deactivation at the module level
55-# * handle some basic but necessary stats data (number of classes, methods...)
56-#
57-[MASTER]
58-# Set the cache size for astng objects.
59-cache-size=500
60-
61-# ignore these specific files
62-# pylint has no idea what to do with this, but our wrapper does some magic
63-ignore=contrib/mocker.py,ubuntuone/syncdaemon/u1fsfsm.py,ubuntuone/platform/linux/__init__.py,ubuntuone/platform/__init__.py,ubuntuone/platform/windows/__init__.py,ubuntuone/platform/filesystem_notifications/pyinotify_agnostic.py
64-
65-[MESSAGES CONTROL]
66-# Disable some checkers
67-disable-checker=typecheck,design,similarities
68-
69-# Disable all messages in the listed categories.
70-disable-msg-cat=R,I
71-
72-# Disable the message(s) with the given id(s).
73-# :E0101: *Explicit return in __init__*
74-# :E0202: An attribute inherited from %s hide this method
75-# :W0142: *Used * or ** magic*
76-# :W0201: Attribute '%s' defined outside __init__
77-# :W0221: *Arguments number differs from %s method* (pylint is confused by * and **)
78-# :W0613: *Unused argument %r* (We get lots of these from interfaces)
79-# :W0621: *Redefining name %r from outer scope (line %s)* (pylint does a poor evaluation)
80-# :W0622: *Redefining built-in '%r'
81-disable-msg=E0101,E0202,W0142,W0201,W0221,W0613,W0621,W0622,C0322
82-
83-
84-[REPORTS]
85-# Tells wether to display a full report or only the messages
86-reports=no
87-
88-
89-# checks for :
90-# * doc strings
91-# * modules / classes / functions / methods / arguments / variables name
92-# * number of arguments, local variables, branchs, returns and statements in
93-# functions, methods
94-# * required module attributes
95-# * dangerous default values as arguments
96-# * redefinition of function / method / class
97-# * uses of the global statement
98-#
99-[BASIC]
100-enable-basic=yes
101-
102-# Required attributes for module, separated by a comma
103-required-attributes=
104-
105-# Regular expression which should only match functions or classes name which do
106-# not require a docstring
107-no-docstring-rgx=(__.*__|setUp|tearDown)
108-
109-# Regular expression which should only match correct module names
110-module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
111-
112-# Regular expression which should only match correct module level names
113-const-rgx=([a-z_][a-z0-9_]*|[A-Z_][A-Z0-9_]*)$
114-
115-# Regular expression which should only match correct class names
116-class-rgx=[A-Z_][a-zA-Z0-9]+$
117-
118-# Regular expression which should only match correct function names
119-function-rgx=[a-z_][a-zA-Z0-9_]*$
120-
121-# Regular expression which should only match correct method names
122-method-rgx=[a-z_][a-zA-Z0-9_]*$
123-
124-# Regular expression which should only match correct instance attribute names
125-attr-rgx=[a-z_][a-zA-Z0-9_]*$
126-
127-# Regular expression which should only match correct argument names
128-argument-rgx=[a-z_][a-zA-Z0-9_]{1,30}$
129-
130-# Regular expression which should only match correct variable names
131-# They are normally all lowercase, but when a constant, they are all uppercase.
132-variable-rgx=([a-z_][a-z0-9_]*|[A-Z_][A-Z0-9_]*)$
133-
134-# Regular expression which should only match correct list comprehension /
135-# generator expression variable names
136-inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
137-
138-# Good variable names which should always be accepted, separated by a comma
139-# Update this to supress warnings about inherrited names (C0103)
140-good-names=_,a,b,c,i,j,k,v,d,f,s,t,l,ex,_,orderBy,getByName,clauseTables
141-
142-# Bad variable names which should always be refused, separated by a comma
143-bad-names=foo,bar,baz,toto,tutu,tata
144-
145-# List of builtins function names that should not be used, separated by a comma
146-bad-functions=apply,input,reduce
147-
148-
149-# checks for:
150-# * warning notes in the code like FIXME, XXX
151-# * PEP 263: source code with non ascii character but no encoding declaration
152-#
153-[MISCELLANEOUS]
154-# List of note tags to take in consideration, separated by a comma.
155-notes=FIXME,XXX,TODO,fixme,todo
156-
157-
158-# checks for :
159-# * unauthorized constructions
160-# * strict indentation
161-# * line length
162-# * use of <> instead of !=
163-#
164-[FORMAT]
165-enable-format=yes
166-
167-# Maximum number of characters on a single line.
168-max-line-length=80
169-
170-# Maximum number of lines in a module
171-max-module-lines=2000
172-
173-# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
174-# tab).
175-indent-string=' '
176
177=== modified file 'ubuntuone/platform/__init__.py'
178--- ubuntuone/platform/__init__.py 2013-02-10 22:54:07 +0000
179+++ ubuntuone/platform/__init__.py 2013-05-29 13:51:24 +0000
180@@ -1,6 +1,6 @@
181 # -*- encoding: utf-8 -*-
182 #
183-# Copyright 2009-2012 Canonical Ltd.
184+# Copyright 2009-2013 Canonical Ltd.
185 #
186 # This program is free software: you can redistribute it and/or modify it
187 # under the terms of the GNU General Public License version 3, as published
188@@ -46,10 +46,6 @@
189 from ubuntuone.platform import logger
190 from ubuntuone.platform import os_helper
191
192-# This imports needs to be here in order to be included in this namespace
193-from ubuntuone.platform import credentials
194-from ubuntuone.platform import tools
195-
196
197 def expand_user(path):
198 """Fix Python expanduser for weird chars in windows."""

Subscribers

People subscribed via source and target branches