def set_option(self, optname, value, action=None, optdict=None): """Method called to set an option (registered in the options list). Overridden to report options setting to Similar """ # pylint: disable-next=fixme # TODO: Refactor after OptionProvider has been moved to argparse BaseChecker.set_option(self, optname, value, action, optdict) if optname == "min-similarity-lines": self.min_lines = (getattr(self.linter.namespace, "min_similarity_lines", None) or self.config.min_similarity_lines) elif optname == "ignore-comments": self.ignore_comments = (getattr(self.linter.namespace, "ignore_comments", None) or self.config.ignore_comments) elif optname == "ignore-docstrings": self.ignore_docstrings = (getattr(self.linter.namespace, "ignore_docstrings", None) or self.config.ignore_docstrings) elif optname == "ignore-imports": self.ignore_imports = (getattr(self.linter.namespace, "ignore_imports", None) or self.config.ignore_imports) elif optname == "ignore-signatures": self.ignore_signatures = (getattr(self.linter.namespace, "ignore_signatures", None) or self.config.ignore_signatures)
def set_option(self, optname, value, action=None, optdict=None): """method called to set an option (registered in the options list) overridden to report options setting to Similar """ BaseChecker.set_option(self, optname, value, action, optdict) if optname == 'min-similarity-lines': self.min_lines = self.config.min_similarity_lines elif optname == 'ignore-comments': self.ignore_comments = self.config.ignore_comments elif optname == 'ignore-docstrings': self.ignore_docstrings = self.config.ignore_docstrings