Skip to content

Commit 6e71c67

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 05d102a commit 6e71c67

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

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

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -147,44 +147,6 @@ def path_args(
147147

148148
return list(str(p) for p in _util.existing_paths(paths))
149149

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-
188150

189151
_config: Config | None = None
190152
"""The global configuration object."""

0 commit comments

Comments
 (0)