Skip to content

Commit

Permalink
[easy] fix typing errors in can_parse
Browse files Browse the repository at this point in the history
doc_version should be of instance `version.Version`

Couple additional build-related issues:

1. hackery for Windows builds no longer necessary!
2. running into ahupp/python-magic#213, so pinning python-magic to an earlier version.
  • Loading branch information
Tony Tung committed May 26, 2020
1 parent 08c9d15 commit 7995150
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ matrix:
- os: windows
language: sh
before_install:
# this hackery is in here because of https://github.com/git-for-windows/git/issues/2291
- powershell mkdir "'C:\Program Files\Git\dev'"
- ln -s /proc/self/fd /dev/fd
- choco install make
- choco install python
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ mypy
pytest>=4.4.0
pytest-cov
pytest-xdist
python-magic
python-magic <= 0.4.15
-r requirements.txt
2 changes: 1 addition & 1 deletion slicedimage/io/_v0_0_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class v0_0_0:

class Reader(_base.Reader):
@classmethod
def can_parse(cls, doc_version: str):
def can_parse(cls, doc_version: version.Version):
return (
version.parse(v0_0_0.VERSION)
<= doc_version
Expand Down
2 changes: 1 addition & 1 deletion slicedimage/io/_v0_1_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class v0_1_0:

class Reader(_base.Reader):
@classmethod
def can_parse(cls, doc_version: str):
def can_parse(cls, doc_version: version.Version):
return (
version.parse(v0_1_0.VERSION)
<= doc_version
Expand Down

0 comments on commit 7995150

Please sign in to comment.