Commit 77286e35 authored by Jérome Perrin's avatar Jérome Perrin

Folder: change syntax for base classes

Defining them like this makes it a bit easier to document the order and
it hides a inconsistent-mro pylint false positive
parent 745baf41
...@@ -682,15 +682,22 @@ _HANDLER_LIST = ( ...@@ -682,15 +682,22 @@ _HANDLER_LIST = (
_BROKEN_BTREE_HANDLER = 'CMFBTreeFolderHandler' _BROKEN_BTREE_HANDLER = 'CMFBTreeFolderHandler'
# Import order: # Import order:
# - FolderMixIn can be about anywhere, let's put it first. _Folder_Bases = (
# - our CopyContainer before ObjectManager, as ObjectManager inherits from # - FolderMixIn can be about anywhere, let's put it first.
# OFS.CopySupport.CopyContainer, which methods we do not want. FolderMixIn,
# - ObjectManager before Base, as Base is only a PropertyManager (no # - our CopyContainer before ObjectManager, as ObjectManager inherits from
# subobjects) and inheriting from ObjectManager overrides the necessary # OFS.CopySupport.CopyContainer, which methods we do not want.
# methods. CopyContainer,
# - Base before generic container types, to allow customising their methods. # - ObjectManager before Base, as Base is only a PropertyManager (no
# - container types, because instances of Folder must be instances of these. # subobjects) and inheriting from ObjectManager overrides the necessary
class Folder(FolderMixIn, CopyContainer, ObjectManager, Base, OFSFolder2, CMFBTreeFolder, CMFHBTreeFolder): # methods.
ObjectManager,
# - Base before generic container types, to allow customising their methods.
Base,
# - container types, because instances of Folder must be instances of these.
OFSFolder2, CMFBTreeFolder, CMFHBTreeFolder)
class Folder(*_Folder_Bases):
""" """
A Folder is a subclass of Base but not of XMLObject. A Folder is a subclass of Base but not of XMLObject.
Folders are not considered as documents and are therefore Folders are not considered as documents and are therefore
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment