Skip to content

Commit

Permalink
fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
trey0 committed Oct 16, 2013
1 parent adf49e9 commit f3ca236
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
6 changes: 4 additions & 2 deletions doc_src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# All Rights Reserved.
# __END_LICENSE__

# pylint: disable=W0622

#
# app documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 21 13:18:22 2009.
Expand Down Expand Up @@ -181,8 +183,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'app.tex', u'geocamFolderWeb Documentation',
u'Trey Smith', 'manual'),
('index', 'app.tex', u'geocamFolderWeb Documentation',
u'Trey Smith', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down
2 changes: 1 addition & 1 deletion example/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
Expand Down
14 changes: 9 additions & 5 deletions example/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
urlpatterns = patterns(
'',

# Example:
# (r'^example/', include('example.foo.urls')),

Expand All @@ -24,9 +26,11 @@

)

urlpatterns = urlpatterns + patterns('',
urlpatterns = urlpatterns + patterns(
'',

(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
# (r'^data/(?P<path>.*)$', 'django.views.static.serve',
# {'document_root': settings.DATA_ROOT}),
)
# (r'^data/(?P<path>.*)$', 'django.views.static.serve',
# {'document_root': settings.DATA_ROOT}),
)
8 changes: 5 additions & 3 deletions geocamFolder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
from geocamUtil.models.ExtrasField import ExtrasField
from geocamFolder import settings

# pylint: disable=C1001,E1101

ACTION_CHOICES = (
'read', # read members
'list', # list subfolders
'insert', # insert members
'delete', # delete members
'change', # change existing members
'admin', # change access control list
)
)
ACTION_LOOKUP = dict([name[0], name] for name in ACTION_CHOICES)


Expand Down Expand Up @@ -426,8 +428,8 @@ def assertAllowed(cls, obj, user, action):

@classmethod
def filterAllowed(cls, querySet, requestingUser, action=Action.READ):
if (not settings.GEOCAM_FOLDER_ACCESS_CONTROL_ENABLED
or ((requestingUser is not None) and requestingUser.is_superuser)):
if (not settings.GEOCAM_FOLDER_ACCESS_CONTROL_ENABLED or
((requestingUser is not None) and requestingUser.is_superuser)):
return querySet
else:
allowedFolderIds = getAllowedFolders(requestingUser, action).iterkeys()
Expand Down
2 changes: 1 addition & 1 deletion geocamFolder/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class FolderTest(TestCase):
def makeFolderWithPerms(self, agent, actionsName):
root = Folder.getRootFolder()
actions = getattr(Actions, actionsName.upper())
prefix = re.sub('^\w+:', '', agent)
prefix = re.sub(r'^\w+:', '', agent)
folder = root.makeSubFolder('%s_%s' % (prefix, actionsName))
folder.clearAcl()
folder.setPermissions(agent, actions)
Expand Down
4 changes: 3 additions & 1 deletion geocamFolder/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

from django.conf.urls import patterns, url

urlpatterns = patterns('',
urlpatterns = patterns(
'',

url(r'^$', 'views.index', name='index'),
)

0 comments on commit f3ca236

Please sign in to comment.