Skip to content

Commit

Permalink
typing __getitem__ in slide.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestoarbitrio committed Nov 22, 2020
1 parent 5577061 commit 2e90a45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -3,7 +3,7 @@ repos:
rev: stable
hooks:
- id: black
language_version: python3.7
language_version: python3.8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
Expand Down
2 changes: 1 addition & 1 deletion src/histolab/slide.py
Expand Up @@ -475,7 +475,7 @@ def __iter__(self) -> Iterator[Slide]:
]
)

def __getitem__(self, slide_id):
def __getitem__(self, slide_id: int) -> Slide:
"""Slide object given the correspondent id"""
return list(self.__iter__())[slide_id]

Expand Down

0 comments on commit 2e90a45

Please sign in to comment.