Skip to content

Commit a1bffad

Browse files
committed
#67 - Update link references of ownership from nexB to aboutcode-org
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent dd4d26a commit a1bffad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+485
-295
lines changed

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# Copyright (c) nexB Inc. and others. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
5-
# See https://github.com/nexB/commoncode for support or download.
5+
# See https://github.com/aboutcode-org/commoncode for support or download.
66
# See https://aboutcode.org for more information about nexB OSS projects.
77
#

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ CommonCode
33

44
- license: Apache-2.0
55
- copyright: copyright (c) nexB. Inc. and others
6-
- homepage_url: https://github.com/nexB/commoncode
6+
- homepage_url: https://github.com/aboutcode-org/commoncode
77
- keywords: utilities, scancode-toolkit, commoncode
88

99
Commoncode provides a set of common functions and utilities for handling various things like paths,
1010
dates, files and hashes. It started as library in scancode-toolkit.
11-
Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
11+
Visit https://aboutcode.org and https://github.com/aboutcode-org/ for support and download.
1212

1313

1414
To install this package use::

commoncode.ABOUT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ description: Commoncode provides a set of common functions and utilities for
44
handling various things like paths, dates, files and hashes. It started as
55
library in scancode-toolkit.
66
keywords: utilities, commoncode, scancode-toolkit
7-
homepage_url: https://github.com/nexB/commoncode
7+
homepage_url: https://github.com/aboutcode-org/commoncode
88
holder: nexB. Inc. and others
99
holder_contact: [email protected]
10-
homepage_url: https://github.com/nexB/commoncode
10+
homepage_url: https://github.com/aboutcode-org/commoncode
1111
license_expression: apache-2.0
1212
name: commoncode
1313
package_url: pkg:pypi/commoncode

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) nexB Inc. and others. All rights reserved.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/ for support or download.
6+
# See https://github.com/aboutcode-org/ for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

configure.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@rem Copyright (c) nexB Inc. and others. All rights reserved.
55
@rem SPDX-License-Identifier: Apache-2.0
66
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
@rem See https://github.com/nexB/ for support or download.
7+
@rem See https://github.com/aboutcode-org/ for support or download.
88
@rem See https://aboutcode.org for more information about nexB OSS projects.
99

1010

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ license = Apache-2.0
1515
description = Set of common utilities, originally split from ScanCode
1616
long_description = file:README.rst
1717
long_description_content_type = text/x-rst
18-
url = https://github.com/nexB/commoncode
18+
url = https://github.com/aboutcode-org/commoncode
1919
classifiers =
2020
Development Status :: 5 - Production/Stable
2121
Intended Audience :: Developers

src/commoncode/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) nexB Inc. and others. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
5-
# See https://github.com/nexB/commoncode for support or download.
5+
# See https://github.com/aboutcode-org/commoncode for support or download.
66
# See https://aboutcode.org for more information about nexB OSS projects.
77
#
88

src/commoncode/archive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) nexB Inc. and others. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
5-
# See https://github.com/nexB/commoncode for support or download.
5+
# See https://github.com/aboutcode-org/commoncode for support or download.
66
# See https://aboutcode.org for more information about nexB OSS projects.
77
#
88

src/commoncode/cliutils.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) nexB Inc. and others. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
5-
# See https://github.com/nexB/commoncode for support or download.
5+
# See https://github.com/aboutcode-org/commoncode for support or download.
66
# See https://aboutcode.org for more information about nexB OSS projects.
77
#
88

@@ -154,18 +154,18 @@ def format_options(self, ctx, formatter):
154154

155155

156156
# overriden and copied from Click to work around Click woes for
157-
# https://github.com/nexB/scancode-toolkit/issues/2583
157+
# https://github.com/aboutcode-org/scancode-toolkit/issues/2583
158158
class DebuggedProgressBar(ProgressBar):
159159

160160
# overriden and copied from Click to work around Click woes for
161-
# https://github.com/nexB/scancode-toolkit/issues/2583
161+
# https://github.com/aboutcode-org/scancode-toolkit/issues/2583
162162
def make_step(self, n_steps):
163163
# always increment
164164
self.pos += n_steps or 1
165165
super(DebuggedProgressBar, self).make_step(n_steps)
166166

167167
# overriden and copied from Click to work around Click woes for
168-
# https://github.com/nexB/scancode-toolkit/issues/2583
168+
# https://github.com/aboutcode-org/scancode-toolkit/issues/2583
169169
def generator(self):
170170
if self.is_hidden:
171171
yield from self.iter
@@ -290,7 +290,7 @@ def progressmanager(
290290
# Click 8. See https://github.com/pallets/click/pull/1698
291291
# Note that we use this argument on Click 8 in order to fix a regression
292292
# that this same PR introduced by Click and tracked originally at
293-
# https://github.com/nexB/scancode-toolkit/issues/2583
293+
# https://github.com/aboutcode-org/scancode-toolkit/issues/2583
294294
# Here we create a dummy progress_class and then for the attribute presence.
295295
pb = progress_class([])
296296
if hasattr(pb, 'update_min_steps'):
@@ -328,7 +328,7 @@ def fixed_width_file_name(path, max_length=25):
328328
len_ext = len(ext)
329329
remaining_length = max_length - len_ext - dots
330330

331-
if remaining_length < 5 or remaining_length < (len_ext + dots):
331+
if remaining_length < 5 or remaining_length < (len_ext + dots):
332332
return ''
333333

334334
prefix_and_suffix_length = abs(remaining_length // 2)
@@ -473,8 +473,10 @@ def validate_dependencies(self, ctx, value):
473473
Validate `value` against declared `required_options` or
474474
`conflicting_options` dependencies.
475475
"""
476-
_validate_option_dependencies(ctx, self, value, self.required_options, required=True)
477-
_validate_option_dependencies(ctx, self, value, self.conflicting_options, required=False)
476+
_validate_option_dependencies(
477+
ctx, self, value, self.required_options, required=True)
478+
_validate_option_dependencies(
479+
ctx, self, value, self.conflicting_options, required=False)
478480

479481
def get_help_record(self, ctx):
480482
if not self.hidden:
@@ -497,11 +499,13 @@ def validate_option_dependencies(ctx):
497499
continue
498500
if not isinstance(param, PluggableCommandLineOption):
499501
if TRACE:
500-
logger_debug(' validate_option_dependencies: skip param:', param)
502+
logger_debug(
503+
' validate_option_dependencies: skip param:', param)
501504
continue
502505
value = values.get(param.name)
503506
if TRACE:
504-
logger_debug(' validate_option_dependencies: param:', param, 'value:', value)
507+
logger_debug(' validate_option_dependencies: param:',
508+
param, 'value:', value)
505509
param.validate_dependencies(ctx, value)
506510

507511

@@ -534,7 +538,7 @@ def _is_set(_value, _param):
534538
if TRACE:
535539
logger_debug()
536540
logger_debug('Checking param:', param)
537-
logger_debug(' value:', value, 'is_set:' , is_set)
541+
logger_debug(' value:', value, 'is_set:', is_set)
538542

539543
if not is_set:
540544
return
@@ -582,7 +586,7 @@ def _is_set(_value, _param):
582586

583587
if TRACE:
584588
logger_debug(' Checking oparam:', oparam)
585-
logger_debug(' value:', ovalue, 'ois_set:' , ois_set)
589+
logger_debug(' value:', ovalue, 'ois_set:', ois_set)
586590

587591
# by convention the last opt is the long form
588592
oopt = oparam.opts[-1]
@@ -594,7 +598,7 @@ def _is_set(_value, _param):
594598
'You must set all of these options if you use this option.' % locals())
595599
raise click.UsageError(msg)
596600

597-
if not required and ois_set:
601+
if not required and ois_set:
598602
msg = ('The option %(opt)s cannot be used together with the %(oopts)s option(s) '
599603
'and %(oopt)s is used. '
600604
'You can set only one of these options at a time.' % locals())

src/commoncode/codec.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) nexB Inc. and others. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
5-
# See https://github.com/nexB/commoncode for support or download.
5+
# See https://github.com/aboutcode-org/commoncode for support or download.
66
# See https://aboutcode.org for more information about nexB OSS projects.
77
#
88

@@ -13,8 +13,9 @@
1313
Numbers to bytes or strings and URLs coder/decoders.
1414
"""
1515

16-
c2i = lambda c: c
17-
i2c = lambda i: bytes([i])
16+
17+
def c2i(c): return c
18+
def i2c(i): return bytes([i])
1819

1920

2021
def num_to_bin(num):

0 commit comments

Comments
 (0)