In Entry, when adding new CatDict objects using Entry._add_cat_dict, the method Entry._check_cat_dict_source was requiring all CatDict to include a source. This should not be the case, as CatDict can internally decide what parameters are required or not. Some methods, like add_source circumvent these checks by manually adding the new catdict (in this case Source) without using the _add_cat_dict method. This PR removes the source requirement from _check_cat_dict_source, which now returns false if the source is erroneous or private (these were the two additional checks previously) and otherwise returns True (even if no source exists). The _check_cat_dict_source() method also checked to make sure that sources were comma-delimited integers. To accomodate this, a new KEY_TYPES.INTEGER type has been added, and SOURCE.ALIAS is required to match this type.
Coverage decreased (-0.08%) to 75.604% when pulling 336f4a2901f6c6aa9fbd73e83de9b45a55b1e00f on fix-source-checks into 29cc0b301ecca7b79d439e44dfb7debb5a5b61ae on master.
In
Entry
, when adding newCatDict
objects usingEntry._add_cat_dict
, the methodEntry._check_cat_dict_source
was requiring allCatDict
to include a source. This should not be the case, asCatDict
can internally decide what parameters are required or not. Some methods, likeadd_source
circumvent these checks by manually adding the new catdict (in this case Source) without using the_add_cat_dict
method. This PR removes the source requirement from_check_cat_dict_source
, which now returns false if the source is erroneous or private (these were the two additional checks previously) and otherwise returns True (even if no source exists). The_check_cat_dict_source()
method also checked to make sure that sources were comma-delimited integers. To accomodate this, a newKEY_TYPES.INTEGER
type has been added, andSOURCE.ALIAS
is required to match this type.