Skip to content

Commit

Permalink
Merge pull request #97 from PickwickSoft/bugfix/#93/fix-individual-im…
Browse files Browse the repository at this point in the history
…port-of-loaders-failing-when-not-all-optional-deps-installed

🐛 Fix individual loader import fails
  • Loading branch information
garlontas authored Nov 7, 2024
2 parents 44a4f7f + 89d69cd commit fd70cad
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions pystreamapi/loaders/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
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__ = ['csv', '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 fd70cad

Please sign in to comment.