From 6669d427f87ec62a86a680a542d2f87f2d65cc80 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Sat, 30 Mar 2024 22:16:37 +0100 Subject: Used PyCharms inspectors. --- libbe/command/diff.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libbe/command/diff.py') diff --git a/libbe/command/diff.py b/libbe/command/diff.py index d8aea37..aca54c3 100644 --- a/libbe/command/diff.py +++ b/libbe/command/diff.py @@ -97,18 +97,18 @@ class Diff (libbe.command.Command): def diff(self, bugdir, subscriptions, params): - if params['repo'] == None: + if params['repo'] is None: if bugdir.storage.versioned == False: raise libbe.command.UserError( 'This repository is not revision-controlled.') - if params['revision'] == None: # get the most recent revision + if params['revision'] is None: # get the most recent revision params['revision'] = bugdir.storage.revision_id(-1) old_bd = libbe.bugdir.RevisionedBugDir(bugdir, params['revision']) else: old_storage = libbe.storage.get_storage(params['repo']) old_storage.connect() old_bd_current = libbe.bugdir.BugDir(old_storage, from_disk=True) - if params['revision'] == None: # use the current working state + if params['revision'] is None: # use the current working state old_bd = old_bd_current else: if old_bd_current.storage.versioned == False: @@ -127,7 +127,7 @@ class Diff (libbe.command.Command): print('\n'.join(uuids), file=self.stdout) else : rep = tree.report_string() - if rep != None: + if rep is not None: print(rep, file=self.stdout) return 0 -- cgit