diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2016-12-06 15:54:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-06 15:54:21 +0000 |
commit | 27e644c873cd457d21b5fee26c190c3559d31a5a (patch) | |
tree | 1ed1cd1e9f08b60dd41d530412eb83c6895dc71d | |
parent | 214dde0d85617d253e1da442905ea5589901d1b3 (diff) | |
parent | dd4ddd8de0b6447d1d3e14f15d227b572ffef00a (diff) |
Merge pull request #909 from pazz/autofix/wrapped2_to3_fix
Fix "Use `is` or `is not` to compare with `None`" issue
-rw-r--r-- | alot/widgets/search.py | 2 | ||||
-rwxr-xr-x | docs/source/generate_configs.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/alot/widgets/search.py b/alot/widgets/search.py index 70c0064a..6c351f4a 100644 --- a/alot/widgets/search.py +++ b/alot/widgets/search.py @@ -54,7 +54,7 @@ class ThreadlineWidget(urwid.AttrMap): datestring = '' if self.thread: newest = self.thread.get_newest_date() - if newest != None: + if newest is not None: datestring = settings.represent_datetime(newest) datestring = pad(datestring) width = len(datestring) diff --git a/docs/source/generate_configs.py b/docs/source/generate_configs.py index 8b0009e8..4320e7f3 100755 --- a/docs/source/generate_configs.py +++ b/docs/source/generate_configs.py @@ -17,7 +17,7 @@ def rewrite_entries(config, path, specpath, sec=None, sort=False): file = open(path, 'w') file.write(NOTE % specpath) - if sec == None: + if sec is None: sec = config if sort: sec.scalars.sort() @@ -46,7 +46,7 @@ def rewrite_entries(config, path, specpath, sec=None, sort=False): etype = 'string list' description += '\n :type: %s\n' % etype - if default != None: + if default is not None: default = default.replace('*','\\*') if etype in ['string', 'string_list', 'gpg_key_hint'] and default != 'None': description += ' :default: "%s"\n\n' % (default) |