prospector 1.12.0__py3-none-any.whl → 1.12.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,10 +2,14 @@ from pathlib import Path
2
2
 
3
3
  from packaging import version as packaging_version
4
4
  from pylint import version as pylint_version
5
- from pylint.config.config_file_parser import _ConfigurationFileParser
6
- from pylint.config.config_initialization import _order_all_first
5
+ from pylint.config.config_initialization import _config_initialization
7
6
  from pylint.lint import PyLinter
8
- from pylint.utils import _splitstrip, utils
7
+
8
+
9
+ class UnrecognizedOptions(Exception):
10
+ """Raised when an unrecognized option is found in the Pylint configuration."""
11
+
12
+ pass
9
13
 
10
14
 
11
15
  class ProspectorLinter(PyLinter):
@@ -16,47 +20,8 @@ class ProspectorLinter(PyLinter):
16
20
 
17
21
  # Largely inspired by https://github.com/pylint-dev/pylint/blob/main/pylint/config/config_initialization.py#L26
18
22
  def config_from_file(self, config_file=None):
19
- """Will return `True` if plugins have been loaded. For pylint>=1.5. Else `False`."""
20
- config_file_parser = _ConfigurationFileParser(False, self)
21
- config_data, config_args = config_file_parser.parse_config_file(file_path=config_file)
22
- if config_data.get("MASTER", {}).get("load-plugins"):
23
- plugins = _splitstrip(config_data["MASTER"]["load-plugins"])
24
- self.load_plugin_modules(plugins)
25
-
26
- config_args = _order_all_first(config_args, joined=False)
27
-
28
- if "init-hook" in config_data:
29
- exec(utils._unquote(config_data["init-hook"])) # pylint: disable=exec-used
30
-
31
- # Load plugins if specified in the config file
32
- if "load-plugins" in config_data:
33
- self.load_plugin_modules(utils._splitstrip(config_data["load-plugins"]))
34
-
35
- self._parse_configuration_file(config_args)
36
-
37
- # Set the current module to the command line
38
- # to allow raising messages on it
39
- self.set_current_module(config_file)
40
-
41
- self._emit_stashed_messages()
42
-
43
- # Set the current module to configuration as we don't know where
44
- # the --load-plugins key is coming from
45
- self.set_current_module("Command line or configuration file")
46
-
47
- # We have loaded configuration from config file and command line. Now, we can
48
- # load plugin specific configuration.
49
- self.load_plugin_configuration()
50
-
51
- # Now that plugins are loaded, get list of all fail_on messages, and
52
- # enable them
53
- self.enable_fail_on_messages()
54
-
55
- self._parse_error_mode()
56
-
57
- # Link the base Namespace object on the current directory
58
- self._directory_namespaces[Path().resolve()] = (self.config, {})
59
-
23
+ """Initialize the configuration from a file."""
24
+ _config_initialization(self, [], config_file=config_file)
60
25
  return True
61
26
 
62
27
  def _expand_files(self, modules):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prospector
3
- Version: 1.12.0
3
+ Version: 1.12.1
4
4
  Summary: Prospector is a tool to analyse Python code by aggregating the result of other tools.
5
5
  Home-page: http://prospector.readthedocs.io
6
6
  License: GPLv2+
@@ -9,7 +9,7 @@ Author: Carl Crowder
9
9
  Author-email: git@carlcrowder.com
10
10
  Maintainer: Carl Crowder
11
11
  Maintainer-email: git@carlcrowder.com
12
- Requires-Python: >=3.8.1,<4.0
12
+ Requires-Python: >=3.9,<4.0
13
13
  Classifier: Development Status :: 5 - Production/Stable
14
14
  Classifier: Environment :: Console
15
15
  Classifier: Intended Audience :: Developers
@@ -23,7 +23,6 @@ Classifier: Programming Language :: Python :: 3.10
23
23
  Classifier: Programming Language :: Python :: 3.11
24
24
  Classifier: Programming Language :: Python :: 3.12
25
25
  Classifier: Programming Language :: Python :: 3.13
26
- Classifier: Programming Language :: Python :: 3.8
27
26
  Classifier: Programming Language :: Python :: 3.9
28
27
  Classifier: Topic :: Software Development :: Quality Assurance
29
28
  Provides-Extra: with_bandit
@@ -36,22 +35,21 @@ Requires-Dist: GitPython (>=3.1.27,<4.0.0)
36
35
  Requires-Dist: PyYAML
37
36
  Requires-Dist: bandit (>=1.5.1); extra == "with_bandit" or extra == "with_everything"
38
37
  Requires-Dist: dodgy (>=0.2.1,<0.3.0)
39
- Requires-Dist: flake8 (<7.0.0)
38
+ Requires-Dist: flake8
40
39
  Requires-Dist: mccabe (>=0.7.0,<0.8.0)
41
40
  Requires-Dist: mypy (>=0.600); extra == "with_mypy" or extra == "with_everything"
42
41
  Requires-Dist: packaging
43
42
  Requires-Dist: pep8-naming (>=0.3.3,<=0.10.0)
44
43
  Requires-Dist: pycodestyle (>=2.9.0)
45
44
  Requires-Dist: pydocstyle (>=2.0.0)
46
- Requires-Dist: pyflakes (>=2.2.0,<4)
45
+ Requires-Dist: pyflakes (>=2.2.0)
47
46
  Requires-Dist: pylint (>=3.0)
48
47
  Requires-Dist: pylint-celery (==0.3)
49
- Requires-Dist: pylint-django (>=2.5,<2.6)
48
+ Requires-Dist: pylint-django (>=2.6.1)
50
49
  Requires-Dist: pylint-flask (==0.6)
51
- Requires-Dist: pylint-plugin-utils (>=0.7,<0.8)
52
50
  Requires-Dist: pyright (>=1.1.3); extra == "with_pyright" or extra == "with_everything"
53
51
  Requires-Dist: pyroma (>=2.4); extra == "with_pyroma" or extra == "with_everything"
54
- Requires-Dist: requirements-detector (>=1.2.0)
52
+ Requires-Dist: requirements-detector (>=1.3.1)
55
53
  Requires-Dist: setoptconf-tmp (>=0.3.1,<0.4.0)
56
54
  Requires-Dist: toml (>=0.10.2,<0.11.0)
57
55
  Requires-Dist: vulture (>=1.5); extra == "with_vulture" or extra == "with_everything"
@@ -57,13 +57,13 @@ prospector/tools/pydocstyle/__init__.py,sha256=kwyvkT372J3rQrTK8MdhQMB8jHShoMu_B
57
57
  prospector/tools/pyflakes/__init__.py,sha256=VgIBmp2orCq2qe374ea9XP0-rudHs09y-SniSuLYvMk,4997
58
58
  prospector/tools/pylint/__init__.py,sha256=gMByTzq970QwHnom0aOq1hPJhA7c-g8T11YCn9H-fxY,9989
59
59
  prospector/tools/pylint/collector.py,sha256=TBvQpXWTcjIaIkZSEv7TWLz4VY9mgBM3xZaOmVz0N40,1334
60
- prospector/tools/pylint/linter.py,sha256=tINIH5h-dYFOwrHNn8tH9ZAr1ktLlFytTwLNU_WU-WA,3437
60
+ prospector/tools/pylint/linter.py,sha256=skH_stRsxkAHemyNqO_2wwHUw5Ew4o1trm7xC_WG5qs,1857
61
61
  prospector/tools/pyright/__init__.py,sha256=rpVe7XmEHCViQsyg6DN9sI5_b9tCO2fFeSuZfEqcaL8,2931
62
62
  prospector/tools/pyroma/__init__.py,sha256=yf5TiA0fB2bxjtqwfod3ahx5hnFyk9iy6u6C3H6VF-4,2947
63
63
  prospector/tools/utils.py,sha256=rOGn_FAiLHG9CS6KzE8FAJzXkEJMzdFYS29U19Ad7bA,1161
64
64
  prospector/tools/vulture/__init__.py,sha256=blzCrLQkGsvUuD6pp5ST3vgwvHvQ7jv-kqgY_Lukh1Q,3058
65
- prospector-1.12.0.dist-info/entry_points.txt,sha256=SxvCGt8MJTEZefHAvwnUc6jDetgCaaYY1Zpifuk8tqU,50
66
- prospector-1.12.0.dist-info/LICENSE,sha256=WoTRadDy8VbcIKoVzl5Q1QipuD_cexAf3ul4MaVLttc,18044
67
- prospector-1.12.0.dist-info/WHEEL,sha256=gSF7fibx4crkLz_A-IKR6kcuq0jJ64KNCkG8_bcaEao,88
68
- prospector-1.12.0.dist-info/METADATA,sha256=ML95Cb9SxjqTaYhAZ2Gink_JNL6-ZNLhZ3MX00DulII,10001
69
- prospector-1.12.0.dist-info/RECORD,,
65
+ prospector-1.12.1.dist-info/entry_points.txt,sha256=SxvCGt8MJTEZefHAvwnUc6jDetgCaaYY1Zpifuk8tqU,50
66
+ prospector-1.12.1.dist-info/LICENSE,sha256=WoTRadDy8VbcIKoVzl5Q1QipuD_cexAf3ul4MaVLttc,18044
67
+ prospector-1.12.1.dist-info/WHEEL,sha256=gSF7fibx4crkLz_A-IKR6kcuq0jJ64KNCkG8_bcaEao,88
68
+ prospector-1.12.1.dist-info/METADATA,sha256=fMfdiC8hs0IXX2U9I8Hush5bm0ak4ssc1KWHM3Ioz38,9886
69
+ prospector-1.12.1.dist-info/RECORD,,