madpah/serializable

style: get rid of unnecessary type conversions

Aperta

#23 aperta il 28 set 2023

 (0 commenti) (0 reazioni) (0 assegnatari)Python (5 fork)auto 404
help wanted

Metriche repository

Star
 (7 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

examples:

# is string already!  why the cast? 
            if type(type_) == str:
                type_to_parse = str(type_)
# is in list already! why the cast? 
                    if results.get('array_type', None) in self._SORTED_CONTAINERS_TYPES:
                        mapped_array_type = self._SORTED_CONTAINERS_TYPES.get(str(results.get("array_type")))

Guida contributor