diff --git a/python_ta/reporters/core.py b/python_ta/reporters/core.py index d85f95c7f..e4298b5ff 100644 --- a/python_ta/reporters/core.py +++ b/python_ta/reporters/core.py @@ -219,16 +219,9 @@ def on_set_current_module(self, module: str, filepath: Optional[str]) -> None: # First, check if `module` is the name of a config file and if so, make filepath the # corresponding path to that config file. possible_config_path = Path(os.path.expandvars(module)).expanduser() - config_extensions = [".toml", ".ini", ".pylintrc"] - - if possible_config_path.exists(): - module_basename = os.path.basename(module) - if ( - any(possible_config_path.suffix == extension for extension in config_extensions) - or module_basename == ".pylintrc" - or module_basename == "pylintrc" - ): - filepath = possible_config_path + + if possible_config_path.exists() and filepath is None: + filepath = possible_config_path # Skip if filepath is None if filepath is None: