# Path: pre_commit_hooks/check_vcs_permalinks.py
# def main(argv: Sequence[str] | None = None) -> int:
#     parser = argparse.ArgumentParser()
#     parser.add_argument('filenames', nargs='*')
#     parser.add_argument(
#         '--additional-github-domain',
#         dest='additional_github_domains',
#         action='append',
#         default=['github.com'],
#     )
#     args = parser.parse_args(argv)
# 
#     patterns = [
#         _get_pattern(domain)
#         for domain in args.additional_github_domains
#     ]
# 
#     retv = 0
# 
#     for filename in args.filenames:
#         retv |= _check_filename(filename, patterns)
# 
#     if retv:
#         print()
#         print('Non-permanent github link detected.')
#         print('On any page on github press [y] to load a permalink.')
#     return retv


from pre_commit_hooks.check_vcs_permalinks import main
from __future__ import annotations



def test_trivial(tmpdir):
    f = tmpdir.join('f.txt').ensure()

# Path: pre_commit_hooks/check_vcs_permalinks.py
# def main(argv: Sequence[str] | None = None) -> int:
#     parser = argparse.ArgumentParser()
#     parser.add_argument('filenames', nargs='*')
#     parser.add_argument(
#         '--additional-github-domain',
#         dest='additional_github_domains',
#         action='append',
#         default=['github.com'],
#     )
#     args = parser.parse_args(argv)
# 
#     patterns = [
#         _get_pattern(domain)
#         for domain in args.additional_github_domains
#     ]
# 
#     retv = 0
# 
#     for filename in args.filenames:
#         retv |= _check_filename(filename, patterns)
# 
#     if retv:
#         print()
#         print('Non-permanent github link detected.')
#         print('On any page on github press [y] to load a permalink.')
#     return retv


# Path: tests/check_vcs_permalinks_test.py
from pre_commit_hooks.check_vcs_permalinks import main

from __future__ import annotations



def test_trivial(tmpdir):
    f = tmpdir.join('f.txt').ensure()

    assert not main((str(f),))