Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
Allow package_data files to not have an extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Jochen Parmentier committed Oct 22, 2020
1 parent 2ca2890 commit a9e3825
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dephell_discover/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ._root import Root


__version__ = '0.2.10'
__version__ = '0.2.11'
__author__ = 'Gram (@orsinium)'
__license__ = 'MIT'

Expand Down
6 changes: 3 additions & 3 deletions dephell_discover/_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def data(self) -> Set[Data]:
for path in self.path.glob('**/*'):
if not self.include(path=path):
continue
# skip dirs, python files and files without extension
if not path.is_file() or path.suffix in ('.py', ''):
# skip dirs and python files
if not path.is_file() or path.suffix in ('.py', ):
continue
data = self._make_data(path=path.parent, ext=path.suffix)
if data is not None:
Expand Down Expand Up @@ -105,7 +105,7 @@ def include(self, path: Path) -> bool:

def _make_data(self, path: Path, ext: str) -> Optional[Data]:
paths = {package.path for package in self.packages}
for parent in chain((path,), path.parents):
for parent in chain((path, ), path.parents):
if parent not in paths:
continue
package = Package(path=parent, root=self.path, module=self._get_module_name(parent))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ command = "mypy --ignore-missing-imports --allow-redefinition dephell_discover"

[tool.poetry]
name = "dephell_discover"
version = "0.2.10"
version = "0.2.11"
description = "Find project modules and data files (packages and package_data for setup.py)."
authors = ["Gram <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit a9e3825

Please sign in to comment.