mirror of
https://github.com/zebrajr/ansible.git
synced 2025-12-06 12:19:53 +01:00
* ansible-test - Clarify need for empty __init__.py * ansible-test - Update code-smell boilerplate. * Update code-smell boilerplate for core. * Update future boilerplate test for ansible-test. All ansible-test code (except for targets) and core-specific sanity tests now use the same boilerplate. The test also checks for unwanted `__future__` and `metaclass` boilerplate. * Relocate target tools to the correct directory. Several tools used on target Python versions were incorrectly placed in the controller directory.
18 lines
410 B
Python
18 lines
410 B
Python
"""Prevent files from being added to directories that are now obsolete."""
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
|
|
|
|
def main():
|
|
"""Main entry point."""
|
|
paths = sys.argv[1:] or sys.stdin.read().splitlines()
|
|
|
|
for path in paths:
|
|
print('%s: directory "%s/" is obsolete and should not contain any files' % (path, os.path.dirname(path)))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|