@@ -81,7 +81,7 @@ def parse_args(args=None):
8181 commands according to `format` and `--all`.
8282
8383 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).
8585 They are then augmented according to the section of the
8686 `PROJECT_ROOT/eachdist.ini` config file specified by the `--mode` option.
8787
@@ -518,18 +518,18 @@ def lint_args(args):
518518
519519 runsubprocess (
520520 args .dry_run ,
521- ("black" , "." ) + (("--diff" , "--check" ) if args .check_only else ()),
521+ ("black" , "--config" , "pyproject.toml" , " ." ) + (("--diff" , "--check" ) if args .check_only else ()),
522522 cwd = rootdir ,
523523 check = True ,
524524 )
525525 runsubprocess (
526526 args .dry_run ,
527- ("isort" , "." )
527+ ("isort" , "--settings-path" , ".isort.cfg" , " ." )
528528 + (("--diff" , "--check-only" ) if args .check_only else ()),
529529 cwd = rootdir ,
530530 check = True ,
531531 )
532- runsubprocess (args .dry_run , ("flake8" , rootdir ), check = True )
532+ runsubprocess (args .dry_run , ("flake8" , "--config" , ".flake8" , rootdir ), check = True )
533533 execute_args (
534534 parse_subargs (
535535 args , ("exec" , "pylint {}" , "--all" , "--mode" , "lintroots" )
@@ -629,7 +629,7 @@ def update_dependencies(targets, version, packages):
629629 for pkg in packages :
630630 update_files (
631631 targets ,
632- "setup.cfg " ,
632+ "pyproject.toml " ,
633633 rf"({ basename (pkg )} .*)==(.*)" ,
634634 r"\1== " + version ,
635635 )
@@ -694,19 +694,19 @@ def test_args(args):
694694
695695
696696def format_args (args ):
697- format_dir = str (find_projectroot ())
697+ root_dir = format_dir = str (find_projectroot ())
698698 if args .path :
699699 format_dir = os .path .join (format_dir , args .path )
700700
701701 runsubprocess (
702702 args .dry_run ,
703- ("black" , "." ),
703+ ("black" , "--config" , f" { root_dir } /pyproject.toml" , " ." ),
704704 cwd = format_dir ,
705705 check = True ,
706706 )
707707 runsubprocess (
708708 args .dry_run ,
709- ("isort" , "--profile" , "black" , "." ),
709+ ("isort" , "--settings-path" , f" { root_dir } /.isort.cfg" , "-- profile" , "black" , "." ),
710710 cwd = format_dir ,
711711 check = True ,
712712 )
0 commit comments