Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-06-10 01:08:12 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2020-06-11 18:11:40 +0300
commit945c5344a60bcdc03483a4c58391dfe385085176 (patch)
tree1c95361a99b2dc871f199d0ad7fa5f7028423a62 /calm/hint.py
parent9820d31f258a099be2ac6638985b2ff7c5da78ce (diff)
Avoid shadowing 'type' builtin
A001 "type" is a python builtin and is being shadowed, consider renaming the variable
Diffstat (limited to 'calm/hint.py')
-rwxr-xr-xcalm/hint.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/calm/hint.py b/calm/hint.py
index 01ef085..5b4935b 100755
--- a/calm/hint.py
+++ b/calm/hint.py
@@ -224,17 +224,17 @@ def hint_file_parse(fn, kind):
if key not in hintkeys[kind]:
errors.append('unknown key %s at line %d' % (key, i))
continue
- type = hintkeys[kind][key]
+ valtype = hintkeys[kind][key]
# check if the key occurs more than once
if key in hints:
errors.append('duplicate key %s' % (key))
# check the value meets any key-specific constraints
- if (type == 'val') and (len(value) == 0):
+ if (valtype == 'val') and (len(value) == 0):
errors.append('%s has empty value' % (key))
- if (type == 'noval') and (len(value) != 0):
+ if (valtype == 'noval') and (len(value) != 0):
errors.append("%s has non-empty value '%s'" % (key, value))
# validate all categories are in the category list (case-insensitively)
@@ -267,7 +267,7 @@ def hint_file_parse(fn, kind):
value = value.replace(' ', ' ')
# only 'ldesc' and 'message' are allowed a multi-line value
- if (type != 'multilineval') and (len(value.splitlines()) > 1):
+ if (valtype != 'multilineval') and (len(value.splitlines()) > 1):
errors.append("key %s has multi-line value" % (key))
# message must have an id and some text