@@ -344,19 +344,6 @@ def validate_regex(
344
344
" either a major version number or an exact version."
345
345
),
346
346
)
347
- @click .option (
348
- "--include" ,
349
- type = str ,
350
- default = DEFAULT_INCLUDES ,
351
- callback = validate_regex ,
352
- help = (
353
- "A regular expression that matches files and directories that should be"
354
- " included on recursive searches. An empty value means all files are included"
355
- " regardless of the name. Use forward slashes for directories on all platforms"
356
- " (Windows, too). Exclusions are calculated first, inclusions later."
357
- ),
358
- show_default = True ,
359
- )
360
347
@click .option (
361
348
"--exclude" ,
362
349
type = str ,
@@ -365,8 +352,8 @@ def validate_regex(
365
352
"A regular expression that matches files and directories that should be"
366
353
" excluded on recursive searches. An empty value means no paths are excluded."
367
354
" Use forward slashes for directories on all platforms (Windows, too)."
368
- " Exclusions are calculated first, inclusions later. [default: "
369
- f" { DEFAULT_EXCLUDES } ]"
355
+ " By default, Black also ignores all paths listed in .gitignore. Changing this "
356
+ f" value will override all default exclusions. [default: { DEFAULT_EXCLUDES } ]"
370
357
),
371
358
show_default = False ,
372
359
)
@@ -376,7 +363,7 @@ def validate_regex(
376
363
callback = validate_regex ,
377
364
help = (
378
365
"Like --exclude, but adds additional files and directories on top of the"
379
- " excluded ones. (Useful if you simply want to add to the default) "
366
+ " default values instead of overriding them. "
380
367
),
381
368
)
382
369
@click .option (
@@ -398,6 +385,20 @@ def validate_regex(
398
385
"editors that rely on using stdin."
399
386
),
400
387
)
388
+ @click .option (
389
+ "--include" ,
390
+ type = str ,
391
+ default = DEFAULT_INCLUDES ,
392
+ callback = validate_regex ,
393
+ help = (
394
+ "A regular expression that matches files and directories that should be"
395
+ " included on recursive searches. An empty value means all files are included"
396
+ " regardless of the name. Use forward slashes for directories on all platforms"
397
+ " (Windows, too). Overrides all exclusions, including from .gitignore and"
398
+ " command line options."
399
+ ),
400
+ show_default = True ,
401
+ )
401
402
@click .option (
402
403
"-W" ,
403
404
"--workers" ,
0 commit comments