Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
c69421aece24
Commit
43204d81
authored
Dec 19, 2019
by
Laurent Peuch
Browse files
[mypy] type AppObject.category
parent
7d3299d6e655
Changes
2
Hide whitespace changes
Inline
Side-by-side
cubicweb/server/hook.py
View file @
c69421ae
...
...
@@ -522,8 +522,8 @@ class Hook(AppObject):
"""
__select__
=
enabled_category
()
# set this in derivated classes
category
=
None
events
:
Union
[
None
,
Tuple
[
str
],
Tuple
[
str
,
str
]]
=
None
category
:
Union
[
None
,
str
]
=
None
order
=
0
# stop pylint from complaining about missing attributes in Hooks classes
eidfrom
=
eidto
=
entity
=
rtype
=
repo
=
None
...
...
cubicweb/web/action.py
View file @
c69421ae
...
...
@@ -32,6 +32,7 @@ special view (with `self._cw.build_url(...)` for instance)
Many examples are available in :mod:`cubicweb.web.views.actions`.
"""
from
typing
import
Optional
from
cubicweb
import
_
...
...
@@ -48,7 +49,7 @@ class Action(AppObject):
__registry__
=
'actions'
__select__
=
match_search_state
(
'normal'
)
order
=
99
category
=
'moreactions'
category
:
Optional
[
str
]
=
'moreactions'
# actions in category 'moreactions' can specify a sub-menu in which they should be filed
submenu
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment