Skip to content

Commit 3efb277

Browse files
committed
fix: remove mutable object as default for method/function values
use immutable tuples as default value markers for parameters where a None value is valid. It does seem that the _marker objects are used in places where None would not be considered a valid value.
1 parent 156a429 commit 3efb277

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roundup/cgi/templating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ def copy_url(self, exclude=("messages", "files")):
15031503
class _HTMLUser(_HTMLItem):
15041504
"""Add ability to check for permissions on users.
15051505
"""
1506-
_marker = []
1506+
_marker = ('_HTMLUserMarker')
15071507

15081508
def hasPermission(self, permission, classname=_marker,
15091509
property=None, itemid=None):
@@ -2200,7 +2200,7 @@ def field(self, labelfirst=False, y_label=None, n_label=None,
22002200

22012201
class DateHTMLProperty(HTMLProperty):
22022202

2203-
_marker = []
2203+
_marker = ('HTMLPropertyMarker')
22042204

22052205
def __init__(self, client, classname, nodeid, prop, name, value,
22062206
anonymous=0, offset=None):

0 commit comments

Comments
 (0)