license_updater.main package

Subpackages

Submodules

license_updater.main.client module

class license_updater.main.client.LicenseUpdater(quiet=False, code_theme='vim', **kwargs)[source]

Bases: object

Create a License Updater

collect_summary(script)[source]

Collect a summary of the changes

detect(paths, details=True, updaters=None, ignore_patterns=None)[source]

Look for changes in files according to updaters

iter_paths(paths)[source]

Helper function to flexibly handle parsing paths.

show_summary()[source]

Show summary of changes

update(paths, details=True, updaters=None, ignore_patterns=None)[source]

Update files.

property updaters

Get a list of updaters available

license_updater.main.script module

class license_updater.main.script.ScriptFile(filename)[source]

Bases: object

Parse a script and/or file into the updater.

We always present the changes (copy of original) and then can easily compare the two. The overall structure should not change.

diff(code_theme='vim', return_result=False)[source]

Show diff between original (cfg) and changed!

property has_changes

Determine if before != after (the action has changed)

write(path)[source]

Save the action to file.

license_updater.main.updater module

class license_updater.main.updater.UpdaterBase[source]

Bases: object

property classpath
date_time_format = '%Y-%m-%dT%H:%M:%S%z'
description = 'An abstract base updater.'
abstract detect(*args, **kwargs)[source]
file_regex = None
matches(path)[source]

Determine if an updater matches a file.

name = 'updater'
property settings

Get settings specific to updater

property slug
property title
class license_updater.main.updater.UpdaterFinder[source]

Bases: Mapping

Create a cache of available updaters.

load()[source]

Load new updaters

Module contents