Skip to content

Commit

Permalink
Migrate from 'if False' to 'if 1 == 2'
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Oct 16, 2023
1 parent b19c458 commit a76181f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ciscoconfparse/ccp_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def calculate_line_id(self):
# together.
_line_id = hash(" " * indent + " ".join(self.text.strip().split()))

if False:
if 1 == 2: # Do not execute this code...
##################################################################
# use str.split() below to ensure that whitespace differences
# hash the same way... I added this code as a possible
Expand All @@ -162,6 +162,7 @@ def calculate_line_id(self):
# I am keeping this in calculate_line_id() to document the
# proposal and why I decided against it.
##################################################################
raise NotImplementedError()
indent_str = indent * " "
if self.is_comment is False:
_line_id = hash(indent_str + " ".join(self.text.strip().split()))
Expand Down

0 comments on commit a76181f

Please sign in to comment.