Skip to content

Commit

Permalink
Fix outstanding MinioBug
Browse files Browse the repository at this point in the history
Somehow a regression and lack of check - we Minio Factory wasn't created correctly. This has been in the code for a while.

Also cleaned up some pylance errors (as if they had been clean, we might have seen this).
  • Loading branch information
gordonwatts committed Dec 22, 2020
1 parent c2fbf66 commit eb84874
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions servicex/servicex.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def __init__(self,
self._servicex_adaptor = servicex_adaptor

if not minio_adaptor:
self._minio_adaptor = MinioAdaptorFactory(config.settings)
self._minio_adaptor = MinioAdaptorFactory()
else:
if isinstance(minio_adaptor, MinioAdaptor):
self._minio_adaptor = MinioAdaptorFactory(always_return=minio_adaptor)
Expand Down Expand Up @@ -249,7 +249,8 @@ async def get_data_rootfiles_stream(self, selection_query: str) \
a `StreamInfoPath` which can be used to access the
file locally.
'''
async for f_info in self._stream_local_files(selection_query, 'root-files'):
async for f_info in \
self._stream_local_files(selection_query, 'root-files'): # type: ignore
yield f_info

@functools.wraps(ServiceXABC.get_data_parquet_async, updated=())
Expand All @@ -272,7 +273,7 @@ async def get_data_parquet_stream(self, selection_query: str) \
a `StreamInfoPath` which can be used to access the
file locally.
'''
async for f_info in self._stream_local_files(selection_query, 'parquet'):
async for f_info in self._stream_local_files(selection_query, 'parquet'): # type: ignore
yield f_info

@functools.wraps(ServiceXABC.get_data_pandas_df_async, updated=())
Expand Down Expand Up @@ -332,7 +333,8 @@ async def get_data_rootfiles_url_stream(self, selection_query: str) \
Args:
selection_query (str): The ServiceX Selection
'''
async for f_info in self._stream_url_buckets(selection_query, 'root-files'):
async for f_info in \
self._stream_url_buckets(selection_query, 'root-files'): # type: ignore
yield f_info

async def get_data_parquet_url_stream(self, selection_query: str) \
Expand All @@ -343,7 +345,7 @@ async def get_data_parquet_url_stream(self, selection_query: str) \
Args:
selection_query (str): The ServiceX Selection
'''
async for f_info in self._stream_url_buckets(selection_query, 'parquet'):
async for f_info in self._stream_url_buckets(selection_query, 'parquet'): # type: ignore
yield f_info

async def _file_return(self, selection_query: str, data_format: str):
Expand Down Expand Up @@ -483,7 +485,8 @@ async def _stream_return(self, selection_query: str,
on the converter call.
'''
as_data = (StreamInfoData(f.file, await asyncio.ensure_future(converter(f.path)))
async for f in self._stream_local_files(selection_query, data_format))
async for f in
self._stream_local_files(selection_query, data_format)) # type: ignore

async for r in as_data:
yield r
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def check_awkward_accessible(col: ak.Array):
'Check to make sure we can look at every item in column'
ak.repartition(col, 3)
ak.repartition(col, 3) # type: ignore


def check_pandas_accessible(col):
Expand Down

0 comments on commit eb84874

Please sign in to comment.