Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

fix broken links #1

Merged
merged 1 commit into from
Sep 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# kubernetes contribution tools

This repo holds tools for kubernetes contributors, it is intended to be used in
kubernetes (related) repos ranging from [k/k repo](github.com/kubernetes/kubernetes)
to [kubernetes-sigs repos](github.com/kubernetes-sigs).
kubernetes (related) repos ranging from [k/k repo](https://github.com/kubernetes/kubernetes)
to [kubernetes-sigs repos](https://github.com/kubernetes-sigs).

## Using, Installation

Expand All @@ -21,11 +21,11 @@ need to be named `verify-boilerplate.sh`/`ensure-boilerplate.sh`.

#### Use

- `verify-boilerplate.sh`
- `verify-boilerplate.sh`
Checks all applicable files in the repo for their license/copyright header,
and warns if the header is missing for a file.

- `ensure-boilerplate.sh`
- `ensure-boilerplate.sh`
Will add a license/copyright header for files which don't have one yet. It
will not update existing headers.

Expand All @@ -50,9 +50,9 @@ You can put a config file into the root of your repo named `boilerplate.json`. T
}
```
Currently supported settings are
- `dirs_to_skip`
- `dirs_to_skip`
A list of directories which is excluded when checking or adding the headers
- `not_generated_files_to_skip`
- `not_generated_files_to_skip`
A list of all the files contain 'DO NOT EDIT', but are not generated

All other settings will be ignored.
Expand Down
6 changes: 3 additions & 3 deletions boilerplate/boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def is_generated_file(filename, data, regexs, files_to_skip):

def match_and_delete(content, re):
match = re.search(content)
if match == None:
if match is None:
return content, None
return re.sub("", content, 1), match.group()

Expand Down Expand Up @@ -124,7 +124,7 @@ def file_passes(filename, refs, regexs, not_generated_files_to_skip):


def file_content_passes(data, filename, ref, extension, generated, regexs):
if ref == None:
if ref is None:
return True

data, _ = replace_specials(data, extension, regexs)
Expand Down Expand Up @@ -262,7 +262,7 @@ def ensure_boilerplate_file(file_name, refs, regexs, not_generated_files_to_skip
new_content = ''

# shebang and such
if special_header != None:
if special_header is not None:
new_content += special_header

# licence header
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/boilerplate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def function_mocker(function_name, original_holder, return_value=None):
# mock the function
def the_mock(*args):
mock_call_args.append(args)
if return_value != None:
if return_value is not None:
return return_value

# use the mock in place of the original implementation
Expand Down