django-split-settings icon indicating copy to clipboard operation
django-split-settings copied to clipboard

Fix/507

Open SukiCZ opened this issue 2 years ago • 2 comments

sorry @sobolevn I've realized one thing.

Getting list of paths matching a non-existent pattern, returns empty list, which differs from getting a paths of parent folder (empty string).

>>> import glob

>>> glob.glob('/tmp/None')  # Previous behavior
[]
>>> glob.glob('/tmp/')  # Current behavior
['/tmp/']

This adds a skip to Optional empty values (+unit-test & docs)

SukiCZ avatar Nov 09 '23 09:11 SukiCZ

Hey @sobolevn, I rebased the PR to make latest change more visible.

If it's unclear, without skipping Optional values the code will result to IsADirectoryError as you can see when commenting out the change and running pytest

>               with open(included_file, 'rb') as to_compile:
E               IsADirectoryError: [Errno 21] Is a directory: './tests/settings/merged'

split_settings/tools.py:107: IsADirectoryError

SukiCZ avatar Dec 11 '23 17:12 SukiCZ

@sobolevn any update on this one?

SukiCZ avatar Mar 27 '24 16:03 SukiCZ