Skip to content

Commit a073286

Browse files
committed
Format code and streamline license headers
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent a63c849 commit a073286

21 files changed

+119
-355
lines changed

NOTICE

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
#
2-
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
63
# ScanCode is a trademark of nexB Inc.
7-
#
8-
# Licensed under the Apache License, Version 2.0 (the "License");
9-
# you may not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing, software
15-
# distributed under the License is distributed on an "AS IS" BASIS,
16-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
# See the License for the specific language governing permissions and
18-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
198
#

src/extractcode/NOTICE

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
#
2-
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
63
# ScanCode is a trademark of nexB Inc.
7-
#
8-
# Licensed under the Apache License, Version 2.0 (the "License");
9-
# you may not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing, software
15-
# distributed under the License is distributed on an "AS IS" BASIS,
16-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
# See the License for the specific language governing permissions and
18-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
198
#

src/extractcode/__init__.py

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#
2-
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
63
# ScanCode is a trademark of nexB Inc.
7-
#
8-
# Licensed under the Apache License, Version 2.0 (the "License");
9-
# you may not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing, software
15-
# distributed under the License is distributed on an "AS IS" BASIS,
16-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
# See the License for the specific language governing permissions and
18-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
198
#
209

2110
import logging
@@ -66,18 +55,18 @@
6655

6756
# note: we do not include special_package in all_kinds by default
6857
all_kinds = (
69-
regular,
70-
regular_nested,
71-
package,
72-
file_system,
73-
docs,
74-
patches,
58+
regular,
59+
regular_nested,
60+
package,
61+
file_system,
62+
docs,
63+
patches,
7564
special_package,
7665
)
7766

7867
default_kinds = (
79-
regular,
80-
regular_nested,
68+
regular,
69+
regular_nested,
8170
package,
8271
)
8372

src/extractcode/api.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#
2-
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
63
# ScanCode is a trademark of nexB Inc.
7-
#
8-
# Licensed under the Apache License, Version 2.0 (the "License");
9-
# you may not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing, software
15-
# distributed under the License is distributed on an "AS IS" BASIS,
16-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
# See the License for the specific language governing permissions and
18-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
198
#
209

2110
"""
@@ -42,13 +31,13 @@ def extract_archives(
4231
4332
Note: this API is returning an iterable and NOT a sequence.
4433
"""
45-
34+
4635
from extractcode.extract import extract
4736
from extractcode import default_kinds
4837
from extractcode import all_kinds
4938

5039
kinds = all_kinds if all_formats else default_kinds
51-
40+
5241
for xevent in extract(
5342
location=location,
5443
kinds=kinds,

src/extractcode/archive.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#
2-
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
63
# ScanCode is a trademark of nexB Inc.
7-
#
8-
# Licensed under the Apache License, Version 2.0 (the "License");
9-
# you may not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing, software
15-
# distributed under the License is distributed on an "AS IS" BASIS,
16-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
# See the License for the specific language governing permissions and
18-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
198
#
209

2110
from collections import namedtuple

src/extractcode/cli.py

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
2-
#
3-
# Copyright (c) nexB Inc. and others.
4-
# SPDX-License-Identifier: Apache-2.0
51
#
6-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
73
# ScanCode is a trademark of nexB Inc.
8-
#
9-
# Licensed under the Apache License, Version 2.0 (the "License");
10-
# you may not use this file except in compliance with the License.
11-
# You may obtain a copy of the License at
12-
#
13-
# http://www.apache.org/licenses/LICENSE-2.0
14-
#
15-
# Unless required by applicable law or agreed to in writing, software
16-
# distributed under the License is distributed on an "AS IS" BASIS,
17-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18-
# See the License for the specific language governing permissions and
19-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
208
#
219

2210
import os

src/extractcode/extract.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#
2-
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
63
# ScanCode is a trademark of nexB Inc.
7-
#
8-
# Licensed under the Apache License, Version 2.0 (the "License");
9-
# you may not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing, software
15-
# distributed under the License is distributed on an "AS IS" BASIS,
16-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
# See the License for the specific language governing permissions and
18-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
198
#
209

2110
import logging

src/extractcode/libarchive2.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#
2-
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
63
# ScanCode is a trademark of nexB Inc.
7-
#
8-
# Licensed under the Apache License, Version 2.0 (the "License");
9-
# you may not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing, software
15-
# distributed under the License is distributed on an "AS IS" BASIS,
16-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
# See the License for the specific language governing permissions and
18-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
198
#
209

2110
from functools import partial

src/extractcode/patch.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#
2-
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
63
# ScanCode is a trademark of nexB Inc.
7-
#
8-
# Licensed under the Apache License, Version 2.0 (the "License");
9-
# you may not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing, software
15-
# distributed under the License is distributed on an "AS IS" BASIS,
16-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
# See the License for the specific language governing permissions and
18-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
198
#
209

2110
import posixpath

src/extractcode/sevenzip.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#
2-
# Copyright (c) nexB Inc. and others.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
63
# ScanCode is a trademark of nexB Inc.
7-
#
8-
# Licensed under the Apache License, Version 2.0 (the "License");
9-
# you may not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing, software
15-
# distributed under the License is distributed on an "AS IS" BASIS,
16-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
# See the License for the specific language governing permissions and
18-
# limitations under the License.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
198
#
209

2110
from collections import defaultdict

0 commit comments

Comments
 (0)