Skip to content

Commit

Permalink
Small cleanup
Browse files Browse the repository at this point in the history
This cleanup is the result of a rebase. It would be more effort to
incorporate these fixes into their original commits.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
  • Loading branch information
carmenbianca committed Sep 18, 2024
1 parent 455fad9 commit 9a237f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/reuse/global_licensing.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
from debian.copyright import Error as DebianError
from license_expression import ExpressionError

from . import ReuseException, ReuseInfo, SourceType
from ._util import _LICENSING, StrPath, is_relative_to
from .covered_files import iter_files
from . import ReuseException, ReuseInfo, SourceType
from .vcs import VCSStrategy

_LOGGER = logging.getLogger(__name__)
Expand Down
4 changes: 0 additions & 4 deletions src/reuse/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@
Collection,
DefaultDict,
Dict,
Generator,
Iterator,
List,
NamedTuple,
Optional,
Set,
Type,
cast,
)

import attrs
Expand All @@ -40,7 +37,6 @@
_LICENSEREF_PATTERN,
StrPath,
_determine_license_path,
is_relative_to,
relative_from_root,
reuse_info_of_file,
)
Expand Down
9 changes: 5 additions & 4 deletions tests/test_covered_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ def test_include_meson_subprojects(self, empty_directory):
subprojects_dir.mkdir()
libfoo_dir = subprojects_dir / "libfoo"
libfoo_dir.mkdir()
(libfoo_dir / "bar.py").write_text("pass")
bar_file = libfoo_dir / "bar.py"
bar_file.write_text("pass")

assert (libfoo_dir / "bar.py") not in iter_files(empty_directory)
assert (libfoo_dir / "bar.py") in iter_files(
assert bar_file not in iter_files(empty_directory)
assert bar_file in iter_files(
empty_directory, include_meson_subprojects=True
)

Expand Down Expand Up @@ -260,7 +261,7 @@ def test_include_submodules(self, submodule_repository):
)

def test_submodule_is_ignored(self, submodule_repository):
"""If a submodule is ignored, iter_files should not raise an Exception"""
"""If a submodule is ignored, iter_files shouldn't raise an Exception"""
(submodule_repository / "submodule/foo.py").write_text("foo")
gitignore = submodule_repository / ".gitignore"
contents = gitignore.read_text()
Expand Down

0 comments on commit 9a237f4

Please sign in to comment.