@@ -81,7 +81,7 @@ def parse_args(args=None):
81
81
commands according to `format` and `--all`.
82
82
83
83
Target paths are initially all Python distribution root paths
84
- (as determined by the existence of setup.py , etc. files).
84
+ (as determined by the existence of pyproject.toml , etc. files).
85
85
They are then augmented according to the section of the
86
86
`PROJECT_ROOT/eachdist.ini` config file specified by the `--mode` option.
87
87
@@ -518,18 +518,18 @@ def lint_args(args):
518
518
519
519
runsubprocess (
520
520
args .dry_run ,
521
- ("black" , "." ) + (("--diff" , "--check" ) if args .check_only else ()),
521
+ ("black" , "--config" , "pyproject.toml" , " ." ) + (("--diff" , "--check" ) if args .check_only else ()),
522
522
cwd = rootdir ,
523
523
check = True ,
524
524
)
525
525
runsubprocess (
526
526
args .dry_run ,
527
- ("isort" , "." )
527
+ ("isort" , "--settings-path" , ".isort.cfg" , " ." )
528
528
+ (("--diff" , "--check-only" ) if args .check_only else ()),
529
529
cwd = rootdir ,
530
530
check = True ,
531
531
)
532
- runsubprocess (args .dry_run , ("flake8" , rootdir ), check = True )
532
+ runsubprocess (args .dry_run , ("flake8" , "--config" , ".flake8" , rootdir ), check = True )
533
533
execute_args (
534
534
parse_subargs (
535
535
args , ("exec" , "pylint {}" , "--all" , "--mode" , "lintroots" )
@@ -629,7 +629,7 @@ def update_dependencies(targets, version, packages):
629
629
for pkg in packages :
630
630
update_files (
631
631
targets ,
632
- "setup.cfg " ,
632
+ "pyproject.toml " ,
633
633
rf"({ basename (pkg )} .*)==(.*)" ,
634
634
r"\1== " + version ,
635
635
)
@@ -694,19 +694,19 @@ def test_args(args):
694
694
695
695
696
696
def format_args (args ):
697
- format_dir = str (find_projectroot ())
697
+ root_dir = format_dir = str (find_projectroot ())
698
698
if args .path :
699
699
format_dir = os .path .join (format_dir , args .path )
700
700
701
701
runsubprocess (
702
702
args .dry_run ,
703
- ("black" , "." ),
703
+ ("black" , "--config" , f" { root_dir } /pyproject.toml" , " ." ),
704
704
cwd = format_dir ,
705
705
check = True ,
706
706
)
707
707
runsubprocess (
708
708
args .dry_run ,
709
- ("isort" , "--profile" , "black" , "." ),
709
+ ("isort" , "--settings-path" , f" { root_dir } /.isort.cfg" , "-- profile" , "black" , "." ),
710
710
cwd = format_dir ,
711
711
check = True ,
712
712
)
0 commit comments