Add user_documents_dir (#39)
* Add user_documents_dir property
* Implement user_documents_dir for Unix
* Implement user_documents_dir for MacOS
* Implement user_documents_dir for Windows
* Implement user_documents_dir on Android
* Add appdirs compatibility tests for properties and public functions
* Only run appdirs test_compatibility test when func is in appdirs
* FInish get_user_dirs_folder doc string
* Add user_documents_dir Unix tests
* Only do xdg_variable tests for functions with a mapping in _func_to_path
* Add user_documents_dir documentation
* Fix mypy type complaint
* Fix CI complaints
* Make test_user_documents_dir_default unix test work on Windows
* Add defaults for Windows CSIDL values
The main reason for this is that there is no environment variable
for the user documents directory.
* Fix api.rst syling
* Improve user_documents_dir in android.py
* Simplify user_documents_dir in unix.py
* Revert to .get() with if is None rather than try-except in get_win_folder_from_registry
* Add informative link to get_user_dirs_folder doc string
* Revert Windows default values
* Revert to .get with is none in get_win_folder_from_env_vars
* Remove user_documents_dir and path arguments
* Switch Android `/data/media/0` for `/storage/emulated/0/Documents`
* Remove unneded comment shortening
* Fix tests
* PR Feedback
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
* Minor formatting and design changes in unix.py
* Switch user_documents_dir Unix tests to mocker
* Cache Android user_documents_dir
* Use Context for Andoird user_documents_folder
* Remove platformdirs.unix import in test_unix.py
* Use lru_cache instead of cached_property
cached_property isn't available in Python versions earlier than 3.8
* Put user_documents_dir fallback in get_win_folder_from_env_vars
Revert None return and checks
* fix: Move user_documents_dir env var fallback to before dict
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
15 files changed