mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed following SonarQube issues:
- Remove this assignment to the local variable, the value is never used. - Rename local variables to match the regular expression - Add logic to this except clause or eliminate it and rethrow the exception automatically. - Rename fields to match the regular expression - Extract this nested conditional expression into an independent statement. - Change this default value to "None" and initialize this parameter inside the function/method. - Update this function so that its implementation is not identical to __repr__ - Refactor this method to not always return the same value - Reraise this exception to stop the application as the user expects - Add missing parameters _w _PY3. This method overrides simplejson.decoder.JSONDecoder.decode. - Remove this redundant continue. - Remove this unused function declaration - Remove this identity check; it will always be False.
This commit is contained in:
committed by
Akshay Joshi
parent
eb2c554601
commit
536593bf8a
@@ -319,7 +319,7 @@ def are_dictionaries_identical(source_dict, target_dict, ignore_whitespaces,
|
||||
return True
|
||||
|
||||
|
||||
def directory_diff(source_dict, target_dict, ignore_keys=[], difference={}):
|
||||
def directory_diff(source_dict, target_dict, ignore_keys=[], difference=None):
|
||||
"""
|
||||
This function is used to recursively compare two dictionaries and
|
||||
return the difference.
|
||||
@@ -330,6 +330,7 @@ def directory_diff(source_dict, target_dict, ignore_keys=[], difference={}):
|
||||
:param difference:
|
||||
"""
|
||||
|
||||
difference = {} if difference is None else difference
|
||||
src_keys = set(source_dict.keys())
|
||||
tar_keys = set(target_dict.keys())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user