Loading django/core/mail/message.py +2 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,8 @@ class EmailMessage(object): into the resulting message attachments. """ if isinstance(filename, MIMEBase): assert content == mimetype == None assert content is None assert mimetype is None self.attachments.append(filename) else: assert content is not None Loading django/forms/widgets.py +1 −1 Original line number Diff line number Diff line Loading @@ -508,7 +508,7 @@ class Select(Widget): return mark_safe('\n'.join(output)) def render_option(self, selected_choices, option_value, option_label): if option_value == None: if option_value is None: option_value = '' option_value = force_text(option_value) if option_value in selected_choices: Loading django/middleware/cache.py +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ class UpdateCacheMiddleware(object): # Control" header before reverting to using the default cache_timeout # length. timeout = get_max_age(response) if timeout == None: if timeout is None: timeout = self.cache_timeout elif timeout == 0: # max-age was set to 0, don't bother caching. Loading django/template/defaulttags.py +1 −1 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ class RegroupNode(Node): def render(self, context): obj_list = self.target.resolve(context, True) if obj_list == None: if obj_list is None: # target variable wasn't found in context; fail silently. context[self.var_name] = [] return '' Loading django/test/_doctest.py +1 −1 Original line number Diff line number Diff line Loading @@ -1345,7 +1345,7 @@ class DocTestRunner: # exception message will be in group(2) m = re.match(r'(.*)\.(\w+:.+\s)', exc_msg) # make sure there's a match if m != None: if m is not None: f_name = m.group(1) # check to see if m.group(1) contains the module name if f_name == exception[0].__module__: Loading Loading
django/core/mail/message.py +2 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,8 @@ class EmailMessage(object): into the resulting message attachments. """ if isinstance(filename, MIMEBase): assert content == mimetype == None assert content is None assert mimetype is None self.attachments.append(filename) else: assert content is not None Loading
django/forms/widgets.py +1 −1 Original line number Diff line number Diff line Loading @@ -508,7 +508,7 @@ class Select(Widget): return mark_safe('\n'.join(output)) def render_option(self, selected_choices, option_value, option_label): if option_value == None: if option_value is None: option_value = '' option_value = force_text(option_value) if option_value in selected_choices: Loading
django/middleware/cache.py +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ class UpdateCacheMiddleware(object): # Control" header before reverting to using the default cache_timeout # length. timeout = get_max_age(response) if timeout == None: if timeout is None: timeout = self.cache_timeout elif timeout == 0: # max-age was set to 0, don't bother caching. Loading
django/template/defaulttags.py +1 −1 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ class RegroupNode(Node): def render(self, context): obj_list = self.target.resolve(context, True) if obj_list == None: if obj_list is None: # target variable wasn't found in context; fail silently. context[self.var_name] = [] return '' Loading
django/test/_doctest.py +1 −1 Original line number Diff line number Diff line Loading @@ -1345,7 +1345,7 @@ class DocTestRunner: # exception message will be in group(2) m = re.match(r'(.*)\.(\w+:.+\s)', exc_msg) # make sure there's a match if m != None: if m is not None: f_name = m.group(1) # check to see if m.group(1) contains the module name if f_name == exception[0].__module__: Loading