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
158158class 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 ())
0 commit comments