ansible-test - Remove no-unicode-literals test

pull/82122/head
Matt Clay 2 years ago
parent 172a010dd7
commit 9765bb46f9

@ -0,0 +1,3 @@
minor_changes:
- ansible-test - Removed the ``no-unicode-literals`` sanity test.
The test is unnecessary now that Python 3 is required and the ``unicode_literals`` feature has no effect.

@ -1,7 +0,0 @@
{
"extensions": [
".py"
],
"ignore_self": true,
"output": "path-line-column-message"
}

@ -1,21 +0,0 @@
"""Disallow use of the unicode_literals future."""
from __future__ import annotations
import re
import sys
def main():
"""Main entry point."""
for path in sys.argv[1:] or sys.stdin.read().splitlines():
with open(path, 'r', encoding='utf-8') as path_fd:
for line, text in enumerate(path_fd.readlines()):
match = re.search(r'(unicode_literals)', text)
if match:
print('%s:%d:%d: do not use `unicode_literals`' % (
path, line + 1, match.start(1) + 1))
if __name__ == '__main__':
main()
Loading…
Cancel
Save