Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions install/helioviewer/hvpull/browser/basebrowser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"""Base data browser definition"""
from typing import Callable, Optional


class BaseDataBrowser:
"""BaseDataBrowser"""
def __init__(self, server):
Expand All @@ -7,8 +10,8 @@ def __init__(self, server):
def get_directories(self, start_time, end_time):
"""Gets a list of directories to be queried for the given time range"""
return None
def get_files(self, uri, extension, filter_func: callable | None = None):

def get_files(self, uri, extension, filter_func: Optional[Callable] = None):
"""Get all the files that end with specified extension at the uri"""
return None

Expand Down
3 changes: 2 additions & 1 deletion install/helioviewer/hvpull/browser/httpbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import os
import socket
from typing import Callable, Optional
from helioviewer.hvpull.browser.basebrowser import BaseDataBrowser, NetworkError

if (sys.version_info >= (3, 0)):
Expand Down Expand Up @@ -81,7 +82,7 @@ def get_directories(self, start_date, end_date):
# filter(lambda url: url.endswith("/"), self._query(location))
return self.server.compute_directories(start_date, end_date)

def get_files(self, location, extension, filter_func: callable | None = None):
def get_files(self, location, extension, filter_func: Optional[Callable] = None):
"""Get all the files that end with specified extension at the uri"""
files = None
num_retries = 0
Expand Down
3 changes: 2 additions & 1 deletion install/helioviewer/hvpull/browser/localbrowser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Local data browser"""
import os
from typing import Callable, Optional
from helioviewer.hvpull.browser.basebrowser import BaseDataBrowser


Expand All @@ -14,7 +15,7 @@ def get_directories(self, start_date, end_date):
"""Get a list of directories at the passed uri"""
return self.server.compute_directories(start_date, end_date)

def get_files(self, location, extension, filter_func: callable | None = None):
def get_files(self, location, extension, filter_func: Optional[Callable] = None):
"""Get all the files that end with specified extension at the uri"""

# ensure the location exists
Expand Down
Loading