Skip to content

Commit

Permalink
Fix Python 3.5 compatibility
Browse files Browse the repository at this point in the history
GitHub: #3
  • Loading branch information
sinoroc committed Nov 9, 2020
1 parent 4f15b14 commit 122ee0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tox_poetry_dev_dependencies/_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _is_test_env(env_config: tox.config.TestenvConfig) -> bool:
def tox_configure(config: tox.config.Config) -> None:
"""Set hook."""
#
project_dir_path = pathlib.Path(config.setupdir)
project_dir_path = pathlib.Path(str(config.setupdir))
#
try:
poetry_ = _get_poetry(project_dir_path)
Expand Down Expand Up @@ -324,7 +324,7 @@ def _get_locked_deps(
project_root_path: pathlib.Path,
) -> LockedDepsT:
#
locked_deps: LockedDepsT = {}
locked_deps = {} # type: LockedDepsT
#
lock_file_path = project_root_path.joinpath(POETRY_LOCKFILE_FILE_NAME)
if lock_file_path.is_file():
Expand All @@ -344,9 +344,9 @@ def _get_locked_deps(
if dep_source:
if dep_source['type'] == 'url':
dep_url = dep_source['url']
dep_pep_508 = f'{dep_name} @ {dep_url}'
dep_pep_508 = '{} @ {}'.format(dep_name, dep_url)
else:
dep_pep_508 = f'{dep_name}=={dep_version}'
dep_pep_508 = '{}=={}'.format(dep_name, dep_version)
#
if dep_pep_508:
dep_config = tox.config.DepConfig(dep_pep_508)
Expand Down

0 comments on commit 122ee0f

Please sign in to comment.