Commit Graph

10 Commits (19d00809d195cee623592da155588d486ca9d75c)

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
Hugo 5852566ff0 Upgrade unit tests to use more useful asserts 6 years ago
Hugo c281d48507 Drop support for EOL Python 2.6 6 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é cdd094220c parser: Add tests for `Comment.is_inline()` 9 years ago
Adrien Vergé 7a7d98c96a parser: Iterate over lines + tokens + comments
Instead of iterating over lines and tokens (and find comments between
tokens in the comment rules), add a new `Comment` type and set rules
with `type = 'comment'`.
9 years ago
Adrien Vergé 7b147cb411 Tests: Remove Python 2.6 from CI tests
Because:

1. It is old. VERY old.

2. Some useful methods (`assertRaisesRegexp`, `assertIsInstance`) are
   only available from Python 2.7.
9 years ago
Adrien Vergé bf96bdde01 Tests: Remove assertIsInstance to support Python 2.6 9 years ago
Adrien Vergé 350213b165 Initial commit 9 years ago