Path 1: 3236 calls (0.54)

'Command line' (1076) 'Command line or configuration file' (1061) '/Users/andrehora/Documents/git/projects-pathspotter/pylint/pylint/testutils/testing...

None (3236)

1def set_current_module(
2        self, modname: str | None, filepath: str | None = None
3    ) -> None:
4        """Set the name of the currently analyzed module and
5        init statistics for it.
6        """
7        if not modname and filepath is None:
8            return
9        self.reporter.on_set_current_module(modname or "", filepath)
10        if modname is None:
11            # TODO: 3.0: Remove all modname or ""'s in this method
12            warnings.warn(
13                (
14                    "In pylint 3.0 modname should be a string so that it can be used to "
15                    "correctly set the current_name attribute of the linter instance. "
16                    "If unknown it should be initialized as an empty string."
17                ),
18                DeprecationWarning,
19                stacklevel=2,
20            )
21        self.current_name = modname
22        self.current_file = filepath or modname
23        self.stats.init_single_module(modname or "")
24
25        # If there is an actual filepath we might need to update the config attribute
26        if filepath:
27            namespace = self._get_namespace_for_file(
28                Path(filepath), self._directory_namespaces
29            )
30            if namespace:
31                self.config = namespace or self._base_config
            

Path 2: 2157 calls (0.36)

'file_to_lint' (100) 'fail_under_plus7_5' (40) 'empty' (38) 'module' (28) 'subsubdirectory.module' (26) 'fail_under_minus10' (24) 'package' (24) 'pack...

'/Users/andrehora/Documents/git/projects-pathspotter/pylint/tests/config/file_to_lint.py' (100) '/Users/andrehora/Documents/git/projects-pathspotter/p...

1def set_current_module(
2        self, modname: str | None, filepath: str | None = None
3    ) -> None:
4        """Set the name of the currently analyzed module and
5        init statistics for it.
6        """
7        if not modname and filepath is None:
8            return
9        self.reporter.on_set_current_module(modname or "", filepath)
10        if modname is None:
11            # TODO: 3.0: Remove all modname or ""'s in this method
12            warnings.warn(
13                (
14                    "In pylint 3.0 modname should be a string so that it can be used to "
15                    "correctly set the current_name attribute of the linter instance. "
16                    "If unknown it should be initialized as an empty string."
17                ),
18                DeprecationWarning,
19                stacklevel=2,
20            )
21        self.current_name = modname
22        self.current_file = filepath or modname
23        self.stats.init_single_module(modname or "")
24
25        # If there is an actual filepath we might need to update the config attribute
26        if filepath:
27            namespace = self._get_namespace_for_file(
28                Path(filepath), self._directory_namespaces
29            )
30            if namespace:
31                self.config = namespace or self._base_config
            

Path 3: 608 calls (0.1)

'--test-file_data-name-0--' (85) '--test-file_data-name-1--' (72) '--test-file_data-name-2--' (54) '--test-file_data-name-3--' (18) '--test-file_data-...

'/Users/andrehora/Documents/git/projects-pathspotter/pylint/tests/input/similar1' (339) 'long_test_file' (16) 'input/w0401_cycle.py' (8) '/Users/andre...

1def set_current_module(
2        self, modname: str | None, filepath: str | None = None
3    ) -> None:
4        """Set the name of the currently analyzed module and
5        init statistics for it.
6        """
7        if not modname and filepath is None:
8            return
9        self.reporter.on_set_current_module(modname or "", filepath)
10        if modname is None:
11            # TODO: 3.0: Remove all modname or ""'s in this method
12            warnings.warn(
13                (
14                    "In pylint 3.0 modname should be a string so that it can be used to "
15                    "correctly set the current_name attribute of the linter instance. "
16                    "If unknown it should be initialized as an empty string."
17                ),
18                DeprecationWarning,
19                stacklevel=2,
20            )
21        self.current_name = modname
22        self.current_file = filepath or modname
23        self.stats.init_single_module(modname or "")
24
25        # If there is an actual filepath we might need to update the config attribute
26        if filepath:
27            namespace = self._get_namespace_for_file(
28                Path(filepath), self._directory_namespaces
29            )
30            if namespace:
31                self.config = namespace or self._base_config
            

Path 4: 7 calls (0.0)

'' (7)

None (7)

None (7)

1def set_current_module(
2        self, modname: str | None, filepath: str | None = None
3    ) -> None:
4        """Set the name of the currently analyzed module and
5        init statistics for it.
6        """
7        if not modname and filepath is None:
8            return
9        self.reporter.on_set_current_module(modname or "", filepath)
10        if modname is None:
11            # TODO: 3.0: Remove all modname or ""'s in this method
12            warnings.warn(
13                (
14                    "In pylint 3.0 modname should be a string so that it can be used to "
15                    "correctly set the current_name attribute of the linter instance. "
16                    "If unknown it should be initialized as an empty string."
17                ),
18                DeprecationWarning,
19                stacklevel=2,
20            )
21        self.current_name = modname
22        self.current_file = filepath or modname
23        self.stats.init_single_module(modname or "")
24
25        # If there is an actual filepath we might need to update the config attribute
26        if filepath:
27            namespace = self._get_namespace_for_file(
28                Path(filepath), self._directory_namespaces
29            )
30            if namespace:
31                self.config = namespace or self._base_config