Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Conversation

bbatha
Copy link
Contributor

@bbatha bbatha commented May 15, 2019

I also fixed the handling of the optional ignore_files argument
used in the zip uploader

I also fixed the handling of the optional ignore_files argument used in the zip uploader

@staticmethod
def _retrieve_file_paths(dir_name, ignored_files=''):
def _retrieve_file_paths(dir_name, ignored_files=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong - if you will keep None you then have to do a check if its not None - this is regression and not a python way - also what is the benefit of doing it like that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this causes a bug - this param is set to None elsewhere and as such comes here. this causes an exception on split attempt

Copy link
Contributor Author

@bbatha bbatha May 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep that's why I changed it. Is there a more pythonic way to approach that? To be clear its set to None by click


exclude = ['.git', '.idea', '.pytest_cache']
if ignored_files is not None:
exclude += ignored_files.split(',')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if anything, we could just skip is not None part and simply check if ignored_files:

@kossak kossak dismissed mkulaczkowski’s stale review May 16, 2019 13:56

if empty, ignore_files comes as None explicitly

@kossak kossak self-requested a review May 16, 2019 13:56
@kossak kossak merged commit c9588ec into master May 16, 2019
@mkulaczkowski mkulaczkowski deleted the notify-about-workspace-zip branch May 24, 2019 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants