Skip to content

Commit

Permalink
Update Pylint to 2.5.3 (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiasli authored Jul 7, 2020
1 parent 0d0308b commit 148173e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
# W0511 fixme
# C0111 Missing docstring
# C0103 Invalid %s name "%s"
# C0415 Import outside toplevel (import-outside-toplevel)
# I0011 Warning locally suppressed using disable-msg
# R0913 Too many arguments
# R0903 too-few-public-methods
# R0401 cyclic-import
# R0205 useless-object-inheritance
# R1717 consider-using-dict-comprehension
disable=W0511,C0111,C0103,I0011,R0913,R0903,R0401,R0205,R1717,useless-suppression
disable=W0511,C0111,C0103,C0415,I0011,R0913,R0903,R0401,R0205,R1717,useless-suppression

[FORMAT]
max-line-length=120
Expand Down
4 changes: 2 additions & 2 deletions knack/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def get(self, section, option, fallback=_UNSET):
def items(self, section):
import re
pattern = self.env_var_name(section, '.+')
candidates = [(k.split('_')[-1], os.environ[k], k) for k in os.environ.keys() if re.match(pattern, k)]
candidates = [(k.split('_')[-1], os.environ[k], k) for k in os.environ if re.match(pattern, k)]
result = {c[0]: c for c in candidates}
for config in self._config_file_chain if self.use_local_config else self._config_file_chain[-1:]:
try:
Expand Down Expand Up @@ -180,7 +180,7 @@ def has_option(self, section, option):
def get(self, section, option):
if self.config_parser:
return self.config_parser.get(section, option)
raise configparser.NoOptionError(section, option)
raise configparser.NoOptionError(option, section)

def getint(self, section, option):
return int(self.get(section, option))
Expand Down
7 changes: 3 additions & 4 deletions knack/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ def option_descriptions(operation):
temp = lines[index].strip()
if any(temp.startswith(x) for x in param_breaks):
break
else:
if temp:
arg_desc += (' ' + temp)
index += 1
if temp:
arg_desc += (' ' + temp)
index += 1

option_descs[arg_name] = arg_desc

Expand Down
2 changes: 1 addition & 1 deletion knack/testsdk/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def _process_response_recording(self, response):
@classmethod
def _custom_request_query_matcher(cls, r1, r2):
""" Ensure method, path, and query parameters match. """
from six.moves.urllib_parse import urlparse, parse_qs # pylint: disable=relative-import, useless-suppression
from six.moves.urllib_parse import urlparse, parse_qs # pylint: disable=useless-suppression

url1 = urlparse(r1.uri)
url2 = urlparse(r2.uri)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ colorama==0.4.3
flake8==3.7.9
jmespath==0.9.5
mock==4.0.1
pylint==2.3.0
pylint==2.5.3
Pygments==2.5.2
PyYAML==5.3.1
six==1.14.0
Expand Down

0 comments on commit 148173e

Please sign in to comment.