Skip to content

Commit 14d628f

Browse files
committed
Remove the (now) unused Config.package_args() method
This was used by the `mypy` `nox` session. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent d047224 commit 14d628f

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

src/frequenz/repo/config/nox/config.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"""
1414

1515
import dataclasses as _dataclasses
16-
import itertools as _itertools
1716
from typing import Self, assert_never, overload
1817

1918
import nox as _nox
@@ -147,44 +146,6 @@ def path_args(
147146

148147
return list(str(p) for p in _util.existing_paths(paths))
149148

150-
def package_args(self, session: _nox.Session, /) -> list[str]:
151-
"""Return the package names to run the checks on.
152-
153-
If positional arguments are present in the nox session, those are used
154-
as the file paths verbatim, and if not, all **existing** `source_paths`
155-
are searched for python packges by looking for `__init__.py` files.
156-
`extra_paths` are used as is, only converting the paths to python
157-
package names (replacing `/` with `.` and removing the suffix `.pyi?`
158-
if it exists.
159-
160-
Args:
161-
session: The nox session to use to look for command-line arguments.
162-
163-
Returns:
164-
The package names found in the `source_paths`.
165-
"""
166-
if session.posargs:
167-
return session.posargs
168-
169-
sources_package_dirs_with_roots = (
170-
(p, _util.find_toplevel_package_dirs(p))
171-
for p in _util.existing_paths(self.source_paths)
172-
)
173-
174-
source_packages = (
175-
_util.path_to_package(pkg_path, root=root)
176-
for root, pkg_paths in sources_package_dirs_with_roots
177-
for pkg_path in pkg_paths
178-
)
179-
180-
extra_packages = (
181-
_util.path_to_package(p) for p in _util.existing_paths(self.extra_paths)
182-
)
183-
184-
return list(
185-
_util.deduplicate(_itertools.chain(source_packages, extra_packages))
186-
)
187-
188149

189150
_config: Config | None = None
190151
"""The global configuration object."""

0 commit comments

Comments
 (0)