Commit Graph

16 Commits

Author SHA1 Message Date
Jon Dufresne
de21c2bf10 Correct str/bytes mixup in utils/jssplitter_generator.py
The file is opened in text mode, so it .wraite() takes str not bytes.
2019-08-17 09:42:16 -07:00
Jon Dufresne
f210475489 Python-3-only clean ups discovered by pyupgrade
https://github.com/asottile/pyupgrade

> A tool to automatically upgrade syntax for newer versions of the
> language.

- Drop u str prefix
- Drop base object inheritance
- Drop args to super()
- Use set literals
- Use dict comprehension
- Use set comprehension
2019-03-17 12:58:03 -07:00
Takeshi KOMIYA
76e9f57c2e Merge branch '1.8' 2019-01-02 16:16:25 +09:00
Takeshi KOMIYA
1b1ebd2c75 A happy new year! 2019-01-02 16:00:30 +09:00
Jon Dufresne
bade33c7e4 Remove unnecessary encoding cookie from Python source files
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:

https://docs.python.org/3/howto/unicode.html#the-string-type

> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...

Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
2018-12-16 12:22:12 -08:00
Takeshi KOMIYA
ea1d2d06f8
Merge pull request #5803 from jdufresne/encoding-utf8
Avoid respecifying default encoding for .encode()/.decode() calls
2018-12-16 20:01:43 +09:00
Jon Dufresne
5bf25eb445 Avoid respecifying default encoding for .encode()/.decode() calls
In Python 3, both .encode() and .decode() default the encoding to
'utf-8'. See the docs:

https://docs.python.org/3/library/stdtypes.html#str.encode
https://docs.python.org/3/library/stdtypes.html#bytes.decode

Simplify and shorten the code by using the default instead of
respecifying it.
2018-12-15 17:19:56 -08:00
Jon Dufresne
1f4fcd656b Remove use of six.unichr()
Use Python 3 chr() instead.
2018-12-15 08:15:56 -08:00
Takeshi KOMIYA
9f5c676322 Use flake8-import-order 2018-01-28 01:52:16 +09:00
Takeshi KOMIYA
f1f6ca8cc9 Merge branch 'happy_new_year' into master 2018-01-01 01:09:17 +09:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
Daniel Hahler
5359bb8ba5 Fix DeprecationWarning for r'…(?u)'
Fixes

> DeprecationWarning: Flags not at the start of the expression …
2017-08-18 11:53:37 +02:00
Takeshi KOMIYA
c57e47e042 Year++ 2017-03-26 11:49:34 +09:00
Takeshi KOMIYA
76ecccf8af Fix flake8 violations 2017-01-12 11:33:58 +09:00
Takeshi KOMIYA
cec5c39d84 Fix style-check violations 2016-11-23 14:35:58 +09:00
Yoshiki Shibukawa
873fab53b4 fix #3150 2016-11-19 23:52:02 +09:00