duffel-api-python
                                
                                 duffel-api-python copied to clipboard
                                
                                    duffel-api-python copied to clipboard
                            
                            
                            
                        Use isinstance rather than type when type-checking
Describe the bug
Some places use type() instead of isinstance() when checking types (e.g. here). Using isinstance() is preferred because it's faster and also considers inheritance (and you’d probably want to still consider subclasses of dict as true in that example above - e.g. if we wanted to use an OrderedDict).
To Reproduce n/a
Expected behavior
Check types with isinstance() instead.
System (please complete the following information): n/a
Additional context n/a