- Added optional
parameter_name
toassert_type_or_raise
. - Added
lcut
andrcut
, fixedsplit_in_parts
. - Updated related tests. Full test coverage for those.
- Fixed github
FILE_URL_REGEX
, the full match included a whitespace at the end. Also made the protocolhttp(s)://
optional. - Added github
SIMPLE_URL_REGEX
, to cheaply match github urls.
- Added methods in
luckydonaldUtils.interactions
to see if a string isTrue
orFalse
def string_is_yes(...)
: checks for a true-ish value and returnFalse
otherwise- and
def string_y_n(...)
: expects y/n (case insensitive)
- Renamed
def assert_or_raise(...)
todef assert_type_or_raise(...)
inluckydonaldUtils.exceptions
(the old name as an alias to keep backwards compatibility, but it will warn you every time)
From Bonbot:
- added
def cut_paragraphs(...)
: cut text down to a specified lenght.
Logger update:
def add_colored_handler(...)
: addedfilter
parameter. It will be applied to the handler.def test_logger_levels(...)
:- added
name
parameter to test with a name other then that function. - added
force_all_levels
parameter to test with setting the logger toDEBUG
level first.
- added
def getLoglevelInt(...)
: Now allows you to input numbers, too (both as str or as int).def getLoglevelInt(...)
: Now allows you to input numbers, too (both as str or as int).- New
class LevelByNameFilter
: You can specify the names and set levels of files you want to log.
- Bugfix: Fixed
@cached
decorator, to work with non jsonable cases, like theself
attribute in classes. Should be more reliable overall.
- Added
@cached(max_age=None)
decorator. - Also decorators can be accessed form the
.decorators
import
- Improvements in
tree
, anddependencies
. - Added
text.split_in_parts(string, parts, strict=False)
: Splits a string in givenparts
pieces.
- Restructured
files.py
into a cleaner structured module.files.basics
mkdir_p
open_folder
open_file_folder
files.mime
guess_extension
get_file_mime
get_byte_mime
get_file_suffix
files.name
do_a_filename
files.temp
gettempdir
- Newly added
files.tree.tree(directory, padding="", print_files=False, level=-1, print_it=True)
. It comes executable from command line. Just callpython -m luckydonaldUtils.files.tree
- Improved
functions.deprecated
to now also accept a message:@deprecated("Reason goes here") def foo(): pass
- Cleaned up imports.
- Also there now is a
dependencies-full.txt
file, listing all dependencies which might be needed. Should now be a complete list. 0.46
- Also there now is a
- Fixed selfupdate. Closes #5.
- Added
luckydonaldUtils.exceptions.assert_or_raise(...)
No changelog was made.
Either look into the commit history, or have a look at the README.md
, it comes with version information too.