Commit Graph

12 Commits

Author SHA1 Message Date
alexrecuenco 4d3d9f64b9 Removed Python2 support
Closes: #6890

Some remarks,

- `# coding ... utf-8` statements are not needed
- isdigit on strings instead of a try-catch.
- Default opening mode is read, so we can do `open()` without the `'r'` everywhere
- Removed inheritinng from `object` class, it isn't necessary in python3.
- `super(ClassName, self)` can now be replaced with `super()`
- Use of itertools and `chain` on a couple places dealing with sets.
- Used the operator module instead of lambdas when warranted
    `itemgetter(0)` instead of `lambda x: x[0]`
    `attrgetter('name')` instead of `lambda x: x.name`
- `sorted` returns a list, so no need to use `list(sorted(...))`
- Removed `dict()` using dictionary comprehensions whenever possible
- Attempted to remove python3.2 support

Signed-off-by: alexrecuenco <alejandrogonzalezrecuenco@gmail.com>
2020-08-11 17:45:13 +07:00
Bastian Venthur e8424d5ae0 Removed Python2 support
Closes: #6890

Signed-off-by: Bastian Venthur <bastian.venthur@flixbus.com>
2020-06-03 17:37:47 +02:00
Ulysses Souza d563a66405 Update `reorder_python_imports` version to fix Unicode problems
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2018-12-01 00:35:34 +01:00
Joffrey F 0c4fc93895 Use newer versions of pre-commit hooks
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-02 20:02:26 -07:00
Joffrey F fd020ed2cf Tests use updated get_config_paths_from_options signature
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F 5831b869e8 Update tests for new environment handling
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F bf8e501b5e Fix pre-commit config
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Aanand Prasad 2c75a8fdf5 Extract helper methods for building config objects from dicts
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-03-02 15:09:48 -08:00
Daniel Nephin 475a091768 Update pre-commit config to enforace that future imports exist in all files.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-07 13:09:03 -05:00
Daniel Nephin 9ce1884925 Add upload to bintray from travis.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-07 14:54:05 -04:00
Daniel Nephin ad46757baf Add more github label areas.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-09-08 19:44:25 -04:00
Daniel Nephin fae6454661 Add pre-commit hooks
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-24 17:04:45 -04:00