Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dbernaciak committed Nov 27, 2023
1 parent 843dfca commit 3527f32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_JPMC_OSS }}
skip_existing: true
packages_dir: main_repo/dist/
10 changes: 5 additions & 5 deletions fusion/fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,7 @@ def listen_to_events(
kwargs = {"headers": {"Last-Event-ID": last_event_id}}

async def async_events():
""" Events sync function. """
timeout = 1e100
session = await get_client(self.credentials, timeout=timeout)
async with sse_client.EventSource(
Expand Down Expand Up @@ -1103,13 +1104,12 @@ async def async_events():
def get_events(
self, last_event_id: str = None, catalog: str = None, in_background: bool = True
) -> Union[None, pd.DataFrame]:
"""
Run server sent event listener and print out the new events. Keyboard terminate to stop.
""" Run server sent event listener and print out the new events. Keyboard terminate to stop.
Args:
last_event_id (str):
catalog (str):
in_background (bool):
last_event_id (str): id of the last event.
catalog (str): catalog.
in_background (bool): execute event monitoring in the background (default = True).
Returns:
Union[None, class:`pandas.DataFrame`]: If in_background is True then the function returns no output.
If in_background is set to False then pandas DataFrame is output upon keyboard termination.
Expand Down
7 changes: 3 additions & 4 deletions fusion/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ def __exit__(self, *args):

@contextlib.contextmanager
def tqdm_joblib(tqdm_object):
"""
Progress bar sensitive to exceptions during the batch processing.
""" Progress bar sensitive to exceptions during the batch processing.
Args:
tqdm_object (tqdm.tqdm):
tqdm_object (tqdm.tqdm): tqdm object.
Yields: tqdm.tqdm object
Expand All @@ -79,7 +78,7 @@ def __call__(self, *args, **kwargs):
try:
if i[0] is True:
n += 1
except Exception as ex:
except Exception as _:
n += 1
tqdm_object.update(n=n)
return super().__call__(*args, **kwargs)
Expand Down

0 comments on commit 3527f32

Please sign in to comment.