Skip to content
Commit c4611166 authored by Jon Dufresne's avatar Jon Dufresne
Browse files

Remove unnecessary dict.get() calls when retrieving config values

Now simply use dict indexing instead. Uses simpler and more conventional
Python syntax for directly accessing a value in a dict. A small micro
optimization for keys known to exist as they're specified in
isort.settings.default. Will also more easily expose typos and
programming errors as an incorrect key now results in a KeyError instead
of silently falling back to a default value.

There remain a few config.get() calls as changing them causes test
failures. I wasn't sure which case they fall under:

* Truly optional values that may not exists, dict.get() is the best choice here
* Should be specified in settings.default
* Exposing an unnoticed error
parent 6ef15224
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment