Commit Graph

10 Commits (b9e1fd18c1acbaa4b0028196f8925ce4e91970d9)

Author SHA1 Message Date
Adrien Vergé 89b75b7c05 refactor: Remove UTF-8 headers in Python files
The `# -*- coding: utf-8 -*-` headers were useful for Python 2, and
aren't needed for Python 3 where UTF-8 is the default.

yamllint support of Python 2 was dropped in early 2021, see commit
a3fc64d "End support for Python 2".

Let's drop these headers.
3 years ago
Adrien Vergé a3fc64d134 End support for Python 2
As planned and advertized, yamllint drops support for Python 2 on 2021.
4 years ago
Mathieu Couette cef0b48993 tests: Add unittest aliases to Python 2.7 4 years ago
Mathieu Couette 11b1f1c14e tests: Fix indentation issues 4 years ago
Mathieu Couette 9ee8c27ac9 tests: Replace deprecated aliases
https://docs.python.org/3/library/unittest.html#deprecated-aliases
4 years ago
Hugo c281d48507 Drop support for EOL Python 2.6 6 years ago
Adrien Vergé 501def327d tests: Use `sys.executable` instead of hard-coded 'python'
To test yamllint as a module, tests run commands like
`python -m yamllint`. But some environments (like continuous integration
of Debian or CentOS) don't always include the `python` executable (they
use `python3` instead).

Let's dynamically detect the Python executable path.
7 years ago
Adrien Vergé d422274563 style: Fix E722 errors reported by pycodestyle
Since a few days ago pycodestyle (formerly called pep8) has a new check:
E722 warning for bare except clauses.

Let's fix our code.
7 years ago
Adrien Vergé 1a961bd4b0 chore(tests): Also run tests on Python 2.6 8 years ago
Adrien Vergé d6a81f1b23 Add tests for `python -m yamllint` 8 years ago