Skip to content

Commit

Permalink
CachingUtilities: Ignore default values
Browse files Browse the repository at this point in the history
Default value from other sections should not impact the
``__contains__`` result for a different section.

Fixes coala#3081
  • Loading branch information
adtac committed Nov 24, 2016
1 parent 02d1588 commit 4399716
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion coalib/misc/CachingUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,11 @@ def get_settings_hash(sections,
if section in targets or targets == []:
section_copy = sections[section].copy()
for setting in ignore_settings:
if setting in section_copy:
try:
section_copy.__getitem__(setting, ignore_defaults=True)
section_copy.delete_setting(setting)
except IndexError:
continue
settings.append(str(section_copy))

return hash_id(str(settings))
Expand Down

0 comments on commit 4399716

Please sign in to comment.