From 6d4de04018b092a2f786c40d4b03a1ce1d5e9d2d Mon Sep 17 00:00:00 2001 From: Robert Blackhart Date: Mon, 29 Jul 2024 11:41:21 -0400 Subject: [PATCH] Updated copyright notice --- examples/async.py | 2 ++ examples/cake.py | 2 ++ examples/hello.py | 2 ++ examples/ls | 2 ++ recline/__init__.py | 3 +-- recline/arg_types/__init__.py | 2 ++ recline/arg_types/choices.py | 2 ++ recline/arg_types/flag.py | 2 ++ recline/arg_types/positional.py | 2 ++ recline/arg_types/ranged_int.py | 2 ++ recline/arg_types/recline_type.py | 2 ++ recline/arg_types/recline_type_error.py | 2 ++ recline/arg_types/remainder.py | 2 ++ recline/commands/__init__.py | 2 ++ recline/commands/async_command.py | 2 ++ recline/commands/builtin_commands.py | 2 ++ recline/commands/cli_command.py | 2 ++ recline/commands/man_utils.py | 2 ++ recline/formatters/__init__.py | 2 ++ recline/formatters/output_formatter.py | 2 ++ recline/formatters/table_formatter.py | 2 ++ recline/repl/completer.py | 2 ++ recline/repl/shell.py | 2 ++ tests/conftest.py | 2 ++ tests/test_arg_types/test_choices.py | 3 +-- tests/test_arg_types/test_cliche_type.py | 3 +-- tests/test_arg_types/test_positional.py | 3 +-- tests/test_arg_types/test_ranged_int.py | 3 +-- tests/test_commands/test_async_command.py | 3 +-- tests/test_commands/test_builtin_commands.py | 3 +-- tests/test_commands/test_cli_command.py | 3 +-- tests/test_commands/test_man_utils.py | 3 +-- tests/test_formatters/test_table_formatter.py | 3 +-- tests/test_repl/test_completer.py | 3 +-- tests/test_repl/test_shell.py | 3 +-- 35 files changed, 58 insertions(+), 24 deletions(-) diff --git a/examples/async.py b/examples/async.py index ffad474..b94792d 100644 --- a/examples/async.py +++ b/examples/async.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This application has some commands that can run in the background and some in the foreground only. """ diff --git a/examples/cake.py b/examples/cake.py index d1c2142..69a0ede 100644 --- a/examples/cake.py +++ b/examples/cake.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + A simple application for making and listing the cakes we have """ diff --git a/examples/hello.py b/examples/hello.py index ae431c5..7054b32 100644 --- a/examples/hello.py +++ b/examples/hello.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + A "hello world" application for CLI commands """ diff --git a/examples/ls b/examples/ls index 4e77c5d..131e009 100755 --- a/examples/ls +++ b/examples/ls @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + An example of how you might implement a unix style CLI command using recline """ diff --git a/recline/__init__.py b/recline/__init__.py index eb5b059..f339137 100644 --- a/recline/__init__.py +++ b/recline/__init__.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2020 NetApp Inc. -All rights reserved. +Original © NetApp 2024 """ import os diff --git a/recline/arg_types/__init__.py b/recline/arg_types/__init__.py index 095e194..e0fb74e 100644 --- a/recline/arg_types/__init__.py +++ b/recline/arg_types/__init__.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This package contains the various custom type definitions for CLI command parameters. If you are defining a CLI command function that takes input with restrictions, you may want to use a type annotation to allow recline to do the checking for you diff --git a/recline/arg_types/choices.py b/recline/arg_types/choices.py index 62ea893..6b26e89 100644 --- a/recline/arg_types/choices.py +++ b/recline/arg_types/choices.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + A Choices type allows the CLI command writer to specify a static list of choices for a parameter. Once the body of the function is invoked, it is guaranteed that the validation was done on the parameter to make sure it matched one. diff --git a/recline/arg_types/flag.py b/recline/arg_types/flag.py index 2d3309a..855257f 100644 --- a/recline/arg_types/flag.py +++ b/recline/arg_types/flag.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + A Flag type allows the CLI command writer to specify an argument that behaves like a boolean flag. The difference between this and declaring an argument as a bool is that no "true" or "false" input is expected of the user if the argument diff --git a/recline/arg_types/positional.py b/recline/arg_types/positional.py index 8571cc9..edac659 100644 --- a/recline/arg_types/positional.py +++ b/recline/arg_types/positional.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + A Positional type allows the CLI command writer to specify an argument that the user will provide positionally. That is, instead of the user typing "-arg_name argvalue", they can just type "argvalue". For example: diff --git a/recline/arg_types/ranged_int.py b/recline/arg_types/ranged_int.py index 40a83c3..6c503b7 100644 --- a/recline/arg_types/ranged_int.py +++ b/recline/arg_types/ranged_int.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + A RangedInt type allows the CLI command writer to specify an integer that is only valid within a certain range. If the user provides a value outside of that range, then the parameter validation will fail and they will receive an error message. diff --git a/recline/arg_types/recline_type.py b/recline/arg_types/recline_type.py index 2dffbf9..67cc1b1 100644 --- a/recline/arg_types/recline_type.py +++ b/recline/arg_types/recline_type.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This module contains the abstract base class for all recline custom types """ diff --git a/recline/arg_types/recline_type_error.py b/recline/arg_types/recline_type_error.py index b5e7437..033fe30 100644 --- a/recline/arg_types/recline_type_error.py +++ b/recline/arg_types/recline_type_error.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This module contains the error class that is raised when there is a type error when validating user input. """ diff --git a/recline/arg_types/remainder.py b/recline/arg_types/remainder.py index ee9544f..8ac22dc 100644 --- a/recline/arg_types/remainder.py +++ b/recline/arg_types/remainder.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + A Remainder type allows the CLI command writer to specify that an argument should consume all of the rest of the input from the CLI and that it will be interpreted inside of the command handler function. diff --git a/recline/commands/__init__.py b/recline/commands/__init__.py index 9b1edc3..c8a7e54 100644 --- a/recline/commands/__init__.py +++ b/recline/commands/__init__.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This package contains the base command class and the builtin command for all recline-based applications to use. """ diff --git a/recline/commands/async_command.py b/recline/commands/async_command.py index 643ab2e..854f3cb 100644 --- a/recline/commands/async_command.py +++ b/recline/commands/async_command.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This is the implementation of an async command for the recline library. It allows for a command to be run in the foreground or background. """ diff --git a/recline/commands/builtin_commands.py b/recline/commands/builtin_commands.py index 0a58f32..c055322 100644 --- a/recline/commands/builtin_commands.py +++ b/recline/commands/builtin_commands.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + The commands defined here are included with every recline application """ diff --git a/recline/commands/cli_command.py b/recline/commands/cli_command.py index 88c2827..249d8b2 100644 --- a/recline/commands/cli_command.py +++ b/recline/commands/cli_command.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This module contains the definition of a CLICommand object. This is the main driver of the recline library. Essentially, a CLICommand takes as input a wrapped function and parses the args and docstring so that when called from the REPL, the diff --git a/recline/commands/man_utils.py b/recline/commands/man_utils.py index c17d9cc..51de9aa 100644 --- a/recline/commands/man_utils.py +++ b/recline/commands/man_utils.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This module holds some utility functions used as part of the man command to format text from CLI commands into consistent man pages that respond to the terminal width. diff --git a/recline/formatters/__init__.py b/recline/formatters/__init__.py index c11e989..16313cf 100644 --- a/recline/formatters/__init__.py +++ b/recline/formatters/__init__.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This package contains useful output formatters. An output formatter can be defined as the return type of a CLI command (using a type annotation). If one is defined, then the result of running the command will be passed to the output formatter diff --git a/recline/formatters/output_formatter.py b/recline/formatters/output_formatter.py index 785b98f..3f98954 100644 --- a/recline/formatters/output_formatter.py +++ b/recline/formatters/output_formatter.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This module contains the abstract class that all other output formatters should inherit from """ diff --git a/recline/formatters/table_formatter.py b/recline/formatters/table_formatter.py index 699a1ae..f557aee 100644 --- a/recline/formatters/table_formatter.py +++ b/recline/formatters/table_formatter.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This module contains a table formatter for CLI output. The table formatter expects output to be an iterable of dictionary-like objects. For example, if a CLI command returned something like: diff --git a/recline/repl/completer.py b/recline/repl/completer.py index a6bd710..ff35583 100644 --- a/recline/repl/completer.py +++ b/recline/repl/completer.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This module implements a readline completer for completing command names as well as argument names and values. """ diff --git a/recline/repl/shell.py b/recline/repl/shell.py index 6a809b0..c4618ff 100644 --- a/recline/repl/shell.py +++ b/recline/repl/shell.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + This is the main staring point for a recline application """ diff --git a/tests/conftest.py b/tests/conftest.py index 2b8fe9e..7778306 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,6 @@ """ +Original © NetApp 2024 + pytest configuration for recline unit tests """ diff --git a/tests/test_arg_types/test_choices.py b/tests/test_arg_types/test_choices.py index b5fb35d..cda5160 100644 --- a/tests/test_arg_types/test_choices.py +++ b/tests/test_arg_types/test_choices.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.arg_types.choices module """ diff --git a/tests/test_arg_types/test_cliche_type.py b/tests/test_arg_types/test_cliche_type.py index 0650eef..9cc7e30 100644 --- a/tests/test_arg_types/test_cliche_type.py +++ b/tests/test_arg_types/test_cliche_type.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.arg_types.recline_type module """ diff --git a/tests/test_arg_types/test_positional.py b/tests/test_arg_types/test_positional.py index fa5e4ed..f436b67 100644 --- a/tests/test_arg_types/test_positional.py +++ b/tests/test_arg_types/test_positional.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.arg_types.positional module """ diff --git a/tests/test_arg_types/test_ranged_int.py b/tests/test_arg_types/test_ranged_int.py index 016ca9d..3aafe8b 100644 --- a/tests/test_arg_types/test_ranged_int.py +++ b/tests/test_arg_types/test_ranged_int.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.arg_types.ranged_int module """ diff --git a/tests/test_commands/test_async_command.py b/tests/test_commands/test_async_command.py index 6279a35..1663b3d 100644 --- a/tests/test_commands/test_async_command.py +++ b/tests/test_commands/test_async_command.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.commands.async_command module """ diff --git a/tests/test_commands/test_builtin_commands.py b/tests/test_commands/test_builtin_commands.py index 0dad141..2d968d5 100644 --- a/tests/test_commands/test_builtin_commands.py +++ b/tests/test_commands/test_builtin_commands.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.commands.builtin_commands module """ diff --git a/tests/test_commands/test_cli_command.py b/tests/test_commands/test_cli_command.py index d6d0826..2333b33 100644 --- a/tests/test_commands/test_cli_command.py +++ b/tests/test_commands/test_cli_command.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.commands.cli_command module """ diff --git a/tests/test_commands/test_man_utils.py b/tests/test_commands/test_man_utils.py index 107142b..69aece2 100644 --- a/tests/test_commands/test_man_utils.py +++ b/tests/test_commands/test_man_utils.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.commands.man_utils module """ diff --git a/tests/test_formatters/test_table_formatter.py b/tests/test_formatters/test_table_formatter.py index dd435c8..68a30c5 100644 --- a/tests/test_formatters/test_table_formatter.py +++ b/tests/test_formatters/test_table_formatter.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.formatters module """ diff --git a/tests/test_repl/test_completer.py b/tests/test_repl/test_completer.py index a3e3540..ecd357f 100644 --- a/tests/test_repl/test_completer.py +++ b/tests/test_repl/test_completer.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.repl.completer module """ diff --git a/tests/test_repl/test_shell.py b/tests/test_repl/test_shell.py index 1330bc3..5df344c 100644 --- a/tests/test_repl/test_shell.py +++ b/tests/test_repl/test_shell.py @@ -1,6 +1,5 @@ """ -Copyright (C) 2019 NetApp Inc. -All rights reserved. +Original © NetApp 2024 A test module for the recline.repl.shell module """