Skip to content

Commit

Permalink
Remove pylint disable=consider-using-with which doesn't seem compatib…
Browse files Browse the repository at this point in the history
…le with earlier pylint
  • Loading branch information
allenrobel committed Dec 22, 2023
1 parent eacfef4 commit 331a726
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions plugins/module_utils/common/params_merge_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ def log_msg(self, msg):
return
if self.file_handle is None:
try:
# since we need self.file_handle open throughout this class
# we are disabling pylint R1732
self.file_handle = open( # pylint: disable=consider-using-with
self.file_handle = open(
f"{self.logfile}", "a+", encoding="UTF-8"
)
except IOError as err:
Expand Down
4 changes: 1 addition & 3 deletions plugins/module_utils/common/params_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ def log_msg(self, msg):
return
if self.file_handle is None:
try:
# since we need self.file_handle open throughout this class
# we are disabling pylint R1732
self.file_handle = open( # pylint: disable=consider-using-with
self.file_handle = open(
f"{self.logfile}", "a+", encoding="UTF-8"
)
except IOError as err:
Expand Down
4 changes: 1 addition & 3 deletions plugins/module_utils/image_mgmt/image_upgrade_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ def log_msg(self, msg):
return
if self.fd is None:
try:
# since we need self.fd open throughout several classes
# we are disabling pylint R1732
self.fd = open( # pylint: disable=consider-using-with
self.fd = open(
f"{self.logfile}", "a+", encoding="UTF-8"
)
except IOError as err:
Expand Down

0 comments on commit 331a726

Please sign in to comment.