Change all of the explicit backslash line continuations into
implicit line continuations. This isn't strictly required by flake8
Clean up all the issues with overly long lines introduced since my
last cleanup.
Fix some whitespace issues.
Ignore py2-specific code causing an issue for the py3 lint in
tests/decoding_test.py
Enable all the errors - the code isn't too bad stylistically.
Remove maximum complexity threshold. The code base is rather complex
(for now).
Set maximum line length to 80. This is slightly more generous than the
default value of 79 but less generous than the previously suggested
120.
Allow certain lines to be ignored - this is necessary for lines which
will trip up the checks in python2 but not python3 or vice versa due
to differences between the python versions.
With the exception that the `loads()` function triggers:
```toml.py:107:1: C901 'loads' is too complex (87)
def loads(s, _dict=dict):
```
This commit is based off PR #99.
* Feature: Let load() handle non-existing files in list.
* Feature/Enhancement: Return FileNotFoundError if no valid files are given (in list) to toml.load().
Ignore any files in list which do not exist on system.
* Enhancement: Add Python 2 support for new feature's Exception raise.
As [discussed here](https://github.com/uiri/toml/pull/99#issuecomment-302256123).
Future TODO: Make .py test-files executable without polluting machine environment.
(AKA: Through a virtualenv permit `import toml` without raising `ImportError`).
Used enumerate to cache the value of sl[i] as item at each iteration.
Hopefully avoids repeated duplicate array lookups.
Was only safe to replace sl[i] with item in locations were prior
mutation is guaranteed not to happen during each iteration
Replaced potentially multiple if statement checks with single dictinoary
lookup using type(v) as a parameter. If the type isn't found in the
dictionary it returns the value of v by default
Moved string dump and list dump logic out into seperate helper
functions.
The sign of the offset needs to be applied after the timedelta
is constructed, or else in the case of negative offsets the minutes
will be counted in the opposite direction as the hours.