{"id":16195460,"url":"https://github.com/thiefmaster/pyquotes","last_synced_at":"2025-03-19T04:30:54.833Z","repository":{"id":40271596,"uuid":"376378503","full_name":"ThiefMaster/pyquotes","owner":"ThiefMaster","description":"A tool that ensures consistent string quotes in your Python code.","archived":false,"fork":false,"pushed_at":"2022-04-12T22:08:15.000Z","size":31,"stargazers_count":9,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T15:59:47.468Z","etag":null,"topics":["autoformat","python","quotes","single-quotes","strings"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThiefMaster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-12T20:29:22.000Z","updated_at":"2022-09-13T07:52:28.000Z","dependencies_parsed_at":"2022-07-24T18:02:31.467Z","dependency_job_id":null,"html_url":"https://github.com/ThiefMaster/pyquotes","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiefMaster%2Fpyquotes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiefMaster%2Fpyquotes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiefMaster%2Fpyquotes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiefMaster%2Fpyquotes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThiefMaster","download_url":"https://codeload.github.com/ThiefMaster/pyquotes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971156,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoformat","python","quotes","single-quotes","strings"],"created_at":"2024-10-10T08:28:08.138Z","updated_at":"2025-03-19T04:30:54.468Z","avatar_url":"https://github.com/ThiefMaster.png","language":"Python","readme":"# pyquotes ![Tests](https://github.com/ThiefMaster/pyquotes/actions/workflows/tests.yml/badge.svg)\n\nSingle quotes are superior. And if you disagree, there's an option for this as well.\n\nIn any case, quotes should be consistent throughout the codebase, and not rely on tools like black\nthat reformat everything. Of course using those tools is perfectly fine if you want this behavior,\nbut sometimes you *just* want to avoid discussing the quote style during PR reviews).\n\n## Installation\n\nInstall pyquotes using `pip`:\n\n```\n$ pip install pyquotes\n```\n\n## Usage\n\n```\n$ pyquotes --help\nUsage: pyquotes [OPTIONS] FILES...\n\n  A tool that ensures consistent string quotes in your Python code.\n\n  When passing a directory, all *.py files inside will be processed\n  recursively.\n\n  If any files needed changes, it exits with a non-zero status code.\n\nOptions:\n  -V, --version                 Show the version and exit.\n  -h, --help                    Show this message and exit.\n  -D, --double-quotes           Prefer double quotes.\n  -q, --quiet                   Do not output which files have been\n                                reformatted.\n\n  -v, --verbose                 Be more verbose and show all files being\n                                processed.\n\n  -d, --diff                    Only show diffs without updating files.\n  -c, --check-only, --check     Only check files without updating them.\n  --exclude PATTERN             Exclude files/directories matching this\n                                pattern. Can be used multiple times. Replaces\n                                the built-in excludes. Does not apply to\n                                explicitly-specified files.\n\n  -X, --extend-exclude PATTERN  Exclude files/directories matching this\n                                pattern. Can be used multiple times. Extends\n                                the built-in excludes. Does not apply to\n                                explicitly-specified files.\n```\n\nUse `--diff` or `--check-only` if you want to run this script in CI (usually using\nflake8-quotes as explained below is the better choice though).\n\n## Configuration\n\n`exclude`, `extend-exclude` and `double-quotes` can be configured via the following\nfiles (looked up in this order, the first one containing settings is used):\n\n- `.pyquotes.cfg` - ConfigParser format, `settings` or `pyquotes` section\n- `setup.cfg` - ConfigParser format, `pyquotes` or `tool:pyquotes` section\n- `pyproject.toml` - TOML format, `tool.pyquotes` section\n\nParsing `pyproject.toml` requires `toml` to be installed; a warning is emitted\nif the file exists and no config is found elsewhere and `toml` is missing.\n\nNote that `exclude` should not be used in most cases; unless you really need to\nwhitelist something that's excluded by default.\n\n### setup.cfg\n\n```ini\n[pyquotes]\ndouble-quotes = false\nextend-exclude =\n    htmlcov\n    .vscode\n```\n\nThe same format can be used in `.pyquotes.cfg` as well.\n\n### pyproject.toml\n\n```toml\n[tool.pyquotes]\ndouble-quotes = false\nextend-exclude = ['htmlcov', '.vscode']\n```\n\n## flake8\n\nIf you use flake8, you may want to install [flake8-quotes](https://pypi.org/project/flake8-quotes/)\nto also get warnings if the code currently has incorrect quotes. You can use the following options\nif you want single quotes:\n\n```ini\n[flake8]\ninline-quotes = single\nmultiline-quotes = single\ndocstring-quotes = double\navoid-escape = true\n```\n\nNote that flake8-quotes is completely independent from this tool, so inconsistencies are possible.\nPlease open an issue if you discover any such cases.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiefmaster%2Fpyquotes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiefmaster%2Fpyquotes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiefmaster%2Fpyquotes/lists"}