cli
ruff_sync.cli ¶
Synchronize Ruff linter configuration across Python projects.
This module provides a CLI tool and library for downloading, parsing, and merging Ruff configuration from upstream sources (like GitHub/GitLab) into local projects.
__all__
module-attribute
¶
OutputFormat ¶
Bases: str, Enum
Output formats for the CLI.
Source code in src/ruff_sync/constants.py
ColoredFormatter ¶
Bases: Formatter
Logging Formatter to add colors.
Source code in src/ruff_sync/cli.py
Arguments ¶
Bases: NamedTuple
CLI arguments for the ruff-sync tool.
Source code in src/ruff_sync/cli.py
fields
cached
classmethod
¶
resolve ¶
Resolve all MISSING sentinels to their effective defaults for execution.
Source code in src/ruff_sync/cli.py
ExecutionArgs ¶
Bases: NamedTuple
Resolved arguments for execution logic — all sentinels replaced with concrete values.
Source code in src/ruff_sync/cli.py
ResolvedArgs ¶
Bases: NamedTuple
Internal container for resolved arguments.
Source code in src/ruff_sync/cli.py
CLIArguments ¶
Bases: Protocol
Protocol for parsed CLI arguments from ArgumentParser.
Source code in src/ruff_sync/cli.py
get_config
cached
¶
Read [tool.ruff-sync] configuration from pyproject.toml.
Examples:
>>> import pathlib
>>> config = get_config(pathlib.Path("."))
>>> if "upstream" in config:
... print(f"Syncing from {config['upstream']}")
Source code in src/ruff_sync/cli.py
main ¶
Run the ruff-sync CLI.
Source code in src/ruff_sync/cli.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | |
inspect ¶
Entry point for the ruff-inspect console script.