mirror of
https://github.com/docker/compose.git
synced 2026-08-04 14:47:40 +00:00
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>
This commit is contained in:
parent
32a5ea5ac8
commit
4d3d9f64b9
61 changed files with 350 additions and 382 deletions
|
|
@ -36,7 +36,7 @@ class SplitBufferTest(unittest.TestCase):
|
|||
self.assert_produces(reader, ['abc\n', 'd'])
|
||||
|
||||
def test_preserves_unicode_sequences_within_lines(self):
|
||||
string = u"a\u2022c\n"
|
||||
string = "a\u2022c\n"
|
||||
|
||||
def reader():
|
||||
yield string.encode('utf-8')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue