Rafał Pitoń 7 лет назад
Родитель
Сommit
4bad9c88ec
4 измененных файлов с 6 добавлено и 29 удалено
  1. 1 1
      .pylintrc
  2. 5 2
      misago/threads/moderation/__init__.py
  3. 0 10
      misago/threads/moderation/posts.py
  4. 0 16
      misago/threads/moderation/threads.py

+ 1 - 1
.pylintrc

@@ -6,7 +6,7 @@ ignore=migrations
 
 
 [MESSAGES CONTROL]
 [MESSAGES CONTROL]
 
 
-disable=abstract-method,duplicate-code,invalid-name,missing-docstring,no-self-use,redefined-builtin,too-few-public-methods,too-many-ancestors,too-many-lines,too-many-public-methods,too-many-statement
+disable=abstract-method,duplicate-code,invalid-name,missing-docstring,no-else-return,no-self-use,redefined-builtin,super-init-not-called,too-few-public-methods,too-many-ancestors,too-many-lines,too-many-public-methods,too-many-statement,unused-argument
 
 
 
 
 [REPORTS]
 [REPORTS]

+ 5 - 2
misago/threads/moderation/__init__.py

@@ -1,3 +1,6 @@
 from .exceptions import ModerationError
 from .exceptions import ModerationError
-from .threads import *
-from .posts import *
+from .threads import (
+    change_thread_title, pin_thread_globally, pin_thread_locally, unpin_thread, move_thread,
+    merge_thread, approve_thread, open_thread, close_thread, unhide_thread, hide_thread,
+    delete_thread)
+from .posts import approve_post, protect_post, unprotect_post, unhide_post, hide_post, delete_post

+ 0 - 10
misago/threads/moderation/posts.py

@@ -5,16 +5,6 @@ from django.utils.translation import ugettext as _
 from .exceptions import ModerationError
 from .exceptions import ModerationError
 
 
 
 
-__all__ = [
-    'approve_post',
-    'protect_post',
-    'unprotect_post',
-    'unhide_post',
-    'hide_post',
-    'delete_post',
-]
-
-
 def approve_post(user, post):
 def approve_post(user, post):
     if post.is_unapproved:
     if post.is_unapproved:
         post.is_unapproved = False
         post.is_unapproved = False

+ 0 - 16
misago/threads/moderation/threads.py

@@ -4,22 +4,6 @@ from django.utils import timezone
 from misago.threads.events import record_event
 from misago.threads.events import record_event
 
 
 
 
-__all__ = [
-    'change_thread_title',
-    'pin_thread_globally',
-    'pin_thread_locally',
-    'unpin_thread',
-    'move_thread',
-    'merge_thread',
-    'approve_thread',
-    'open_thread',
-    'close_thread',
-    'unhide_thread',
-    'hide_thread',
-    'delete_thread',
-]
-
-
 @transaction.atomic
 @transaction.atomic
 def change_thread_title(request, thread, new_title):
 def change_thread_title(request, thread, new_title):
     if thread.title != new_title:
     if thread.title != new_title: