Skip to content

Commit

Permalink
fixed styling
Browse files Browse the repository at this point in the history
added python 3.8 to tox
droppen python 2.7
  • Loading branch information
jeff-99 committed Nov 17, 2020
1 parent 30d03ff commit 000ae44
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
6 changes: 6 additions & 0 deletions HISTORY.rst
Expand Up @@ -2,6 +2,12 @@
History
=======

0.6.1 (2020-11-17)
------------------
* Updated development dependencies
* Added python 3.8 support
* Dropped python 2.7 support

0.6.0 (2017-10-28)
------------------
* Added version option to main command
Expand Down
11 changes: 9 additions & 2 deletions hashdex/cli.py
Expand Up @@ -10,7 +10,7 @@
@click.group(invoke_without_command=True)
@click.option("-v", help="show current version", is_flag=True)
@click.pass_context
def cli(ctx,v):
def cli(ctx, v):
if v:
click.echo(hashdex.__version__)
ctx.exit()
Expand Down Expand Up @@ -66,7 +66,13 @@ def check(directory, index, rm, mv):
os.unlink(file.full_path)
elif not rm and mv:
new_path = os.path.join(mv, file.filename)
click.echo('moving {0} to {1} - original file located at {2}'.format(file.full_path, new_path,original.full_path))
click.echo(
'moving {0} to {1} - original file located at {2}'.format(
file.full_path,
new_path,
original.full_path
)
)
os.rename(file.full_path, new_path)
else:
click.echo('duplicate file found {0} - original file located at {1}'.format(
Expand Down Expand Up @@ -107,5 +113,6 @@ def cleanup(index):
indexer.delete(file)
click.echo("Deleted {0}".format(file.full_path))


if __name__ == '__main__': # pragma: no cover
cli()
1 change: 1 addition & 0 deletions requirements_dev.txt
Expand Up @@ -12,3 +12,4 @@ pytest==6.1.2
pytest-mock==3.3.1
pytest-runner==5.2
six==1.15.0
Click==6.7
2 changes: 1 addition & 1 deletion tests/test_cli.py
Expand Up @@ -22,7 +22,7 @@ def test_version_command():
runner = CliRunner()

result = runner.invoke(cli, ['-v'])
pattern = re.compile("[0-9]+\.[0-9]+\.[0-9]+")
pattern = re.compile(r'[0-9]+\.[0-9]+\.[0-9]+')

assert pattern.match(result.output)

Expand Down
4 changes: 2 additions & 2 deletions tox.ini
@@ -1,13 +1,13 @@
[tox]
envlist = py27, py34, py35, py36, py37, flake8
envlist = py34, py35, py36, py37, py38, flake8

[travis]
python =
3.8: py38
3.7: py37
3.6: py36
3.5: py35
3.4: py34
2.7: py27

[testenv:flake8]
basepython=python
Expand Down

0 comments on commit 000ae44

Please sign in to comment.