The add_license_headers.py module#

Summary#

set_lint_args

Add lint arguments to the parser for REUSE.

link_assets

Link the default template and/or license from the assets folder to your git repo.

mkdirs_and_link

Make .reuse or LICENSES directory and create symbolic link to file.

list_noncompliant_files

Get a list of the files that are missing license headers.

set_header_args

Set arguments for REUSE.

non_recursive_file_check

Check if the committed file is missing its header.

recursive_file_check

Check if the committed file is missing its header.

check_same_content

Check if file before the hook ran is the same as after the hook ran.

add_hook_changes

Add earlier hook changes to updated file with header.

get_full_paths

Update file paths to be absolute paths with system separators.

update_license_file

Update the LICENSE file to match MIT.txt, adjusting the year span to each repository.

cleanup

Unlink the default asset files, and remove directories if empty.

find_files_missing_header

Find files that are missing license headers and run REUSE on them.

main

Find files missing license headers and run REUSE on them.

DEFAULT_TEMPLATE

Default template to use for license headers.

DEFAULT_COPYRIGHT

Default copyright line for license headers.

DEFAULT_LICENSE

Default license for headers.

DEFAULT_START_YEAR

Description#

Module for running REUSE to add missing license headers to files.

A license header consists of the Ansys copyright statement and licensing information.

Module detail#

add_license_headers.DEFAULT_TEMPLATE = 'ansys'#

Default template to use for license headers.

Default copyright line for license headers.

add_license_headers.DEFAULT_LICENSE = 'MIT'#

Default license for headers.

add_license_headers.DEFAULT_START_YEAR#