Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a couple pylint issues. #1629

Merged
merged 1 commit into from
May 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/lib/CIME/XML/machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, infile=None, files=None, machine=None):
# Append the contents of $HOME/.cime/config_machines.xml if it exists
# This could cause problems if node matchs are repeated when only one is expected
local_infile = os.path.join(os.environ.get("HOME"),".cime","config_machines.xml")
logger.debug("Infile: {}" , local_infile)
logger.debug("Infile: {}".format(local_infile))
if os.path.exists(local_infile):
GenericXML.read(self, local_infile, schema)

Expand Down Expand Up @@ -211,7 +211,7 @@ def get_field_from_list(self, listname, reqval=None, attributes=None):

expect(supported_values is not None,
"No list found for " + listname + " on machine " + self.machine)
supported_values = supported_values.split(",")
supported_values = supported_values.split(",") #pylint: disable=no-member

if reqval is None or reqval == "UNSET":
return supported_values[0]
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib/CIME/code_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def _matches(file_path, file_ends):
def _should_pylint_skip(filepath):
###############################################################################
# TODO - get rid of this
list_of_directories_to_ignore = ("xmlconvertors", "pointclm", "point_clm", "tools", "machines", "apidocs")
list_of_directories_to_ignore = ("xmlconvertors", "pointclm", "point_clm", "tools", "machines", "apidocs", "doc")
for dir_to_skip in list_of_directories_to_ignore:
if dir_to_skip in filepath:
if dir_to_skip + "/" in filepath:
return True

return False
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/CIME/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def run_cmd_no_fail(cmd, input_str=None, from_dir=None, verbose=None,
>>> run_cmd_no_fail('echo THE ERROR >&2; false')
Traceback (most recent call last):
...
SystemExit: ERROR: Command: 'echo THE ERROR >&2; false' failed with error 'THE ERROR'
SystemExit: ERROR: Command: 'echo THE ERROR >&2; false' failed with error 'THE ERROR' from dir '/home/jgfouca/cime_yetanother/scripts/lib/CIME'

>>> run_cmd_no_fail('grep foo', input_str='foo')
'foo'
Expand Down