Skip to content

Commit

Permalink
🐛 Fix individual loader import fails
Browse files Browse the repository at this point in the history
  • Loading branch information
garlontas committed Nov 7, 2024
1 parent 44a4f7f commit ef6616d
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions pystreamapi/loaders/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
__all__ = []

from pystreamapi.loaders.__csv.__csv_loader import csv
from pystreamapi.loaders.__json.__json_loader import json
from pystreamapi.loaders.__xml.__xml_loader import xml
from pystreamapi.loaders.__yaml.__yaml_loader import yaml

__all__ = [
'csv',
'json',
'xml',
'yaml'
]

__all__.append('csv')
__all__.append('json')

try:
from pystreamapi.loaders.__xml.__xml_loader import xml

__all__.append('xml')
except ImportError:
...

try:
from pystreamapi.loaders.__yaml.__yaml_loader import yaml

__all__.append('yaml')
except ImportError:
...

0 comments on commit ef6616d

Please sign in to comment.