Skip to content

Commit

Permalink
Move additional_files.py out of config module.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Sep 13, 2023
1 parent ec400de commit 8b1e203
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
8 changes: 8 additions & 0 deletions doc-source/api/additional_files.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=================================
:mod:`whey.additional_files`
=================================

.. autosummary-widths:: 6/16

.. automodule:: whey.additional_files
:no-special-members:
7 changes: 0 additions & 7 deletions doc-source/api/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
:members: load_toml


:mod:`whey.config.additional_files`
=======================================

.. automodule:: whey.config.additional_files
:no-special-members:


:mod:`whey.config.pep621`
==========================

Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from pytest_regressions.data_regression import RegressionYamlDumper

# this package
from whey.config.additional_files import AdditionalFilesEntry
from whey.additional_files import AdditionalFilesEntry

_C = TypeVar("_C", bound=Callable)

Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions whey/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
from shippinglabel.checksum import get_record_entry
from shippinglabel.requirements import ComparableRequirement, combine_requirements

if TYPE_CHECKING:
# this package
from whey.config.additional_files import AdditionalFilesEntry
# this package
from whey import additional_files

__all__ = ("AbstractBuilder", "SDistBuilder", "WheelBuilder")

Expand Down Expand Up @@ -263,7 +262,7 @@ def copy_additional_files(self) -> None:

self.parse_additional_files(*self.config["additional-files"])

def parse_additional_files(self, *entries: "AdditionalFilesEntry") -> None: # pylint: disable=useless-return
def parse_additional_files(self, *entries: additional_files.AdditionalFilesEntry) -> None: # pylint: disable=useless-return
r"""
Copy additional files to the build directory, by parsing `MANIFEST.in`_-style entries.
Expand All @@ -273,7 +272,7 @@ def parse_additional_files(self, *entries: "AdditionalFilesEntry") -> None: # p
"""

# this package
from whey.config import additional_files
from whey import additional_files

for entry in entries:
if isinstance(entry, (additional_files.Include, additional_files.RecursiveInclude)):
Expand Down
2 changes: 1 addition & 1 deletion whey/config/whey.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
from shippinglabel.classifiers import validate_classifiers

# this package
from whey import additional_files
from whey.builder import AbstractBuilder, SDistBuilder, WheelBuilder
from whey.config import additional_files

__all__ = (
"WheyParser",
Expand Down

0 comments on commit 8b1e203

Please sign in to comment.