Skip to content
Snippets Groups Projects
  • Mauro Carvalho Chehab's avatar
    ed47dd9f
    scripts/xls_to_doc.py: make pylint happy · ed47dd9f
    Mauro Carvalho Chehab authored
    
    Pylint is too picky. Still, it is useful to run it, as sometimes
    it could point to real issues.
    
    So, let's make it happy by:
    - disabling R0902, which is one of those "too many" warnings
      (IMO, it doesn't make sense to limit the number of times some
      thing can be used inside a code;
    
    - disabling another warning about not using .items(). On that
      particular case, IMO it will make the code less clearer for
      reviewers and future maintainership, e. g.:
    
    	test_nr = self.tests[testname].get("Test")
    
      and similar occurrences for self.tests[testname] is a lot clearer
      than:
    
    	for testname, value in self.tests.items():
    		...
    		test_nr = value.get("Test")
    		...
    		value["subtests"][subtest][k] = val
    
    	(and other similar occurrences)
    
      ok, a better name than "value" might help, but still the
      obvious choice would be "test", "test_testname" and such,
      which just makes the code more obfuscated.
    
      So, ignore the warning for good.
    
    - remove a blank line before a docstring comment;
    
    - remove a currently unused argument from update_files;
    
    - fix indent on a single line.
    
    No functional changes.
    
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
    Acked-by: default avatarKamil Konieczny <kamil.konieczny@linux.intel.com>
    ed47dd9f
    History
    scripts/xls_to_doc.py: make pylint happy
    Mauro Carvalho Chehab authored
    
    Pylint is too picky. Still, it is useful to run it, as sometimes
    it could point to real issues.
    
    So, let's make it happy by:
    - disabling R0902, which is one of those "too many" warnings
      (IMO, it doesn't make sense to limit the number of times some
      thing can be used inside a code;
    
    - disabling another warning about not using .items(). On that
      particular case, IMO it will make the code less clearer for
      reviewers and future maintainership, e. g.:
    
    	test_nr = self.tests[testname].get("Test")
    
      and similar occurrences for self.tests[testname] is a lot clearer
      than:
    
    	for testname, value in self.tests.items():
    		...
    		test_nr = value.get("Test")
    		...
    		value["subtests"][subtest][k] = val
    
    	(and other similar occurrences)
    
      ok, a better name than "value" might help, but still the
      obvious choice would be "test", "test_testname" and such,
      which just makes the code more obfuscated.
    
      So, ignore the warning for good.
    
    - remove a blank line before a docstring comment;
    
    - remove a currently unused argument from update_files;
    
    - fix indent on a single line.
    
    No functional changes.
    
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
    Acked-by: default avatarKamil Konieczny <kamil.konieczny@linux.intel.com>