{"id":48196923,"url":"https://github.com/ghazi-git/flake8-custom-error-messages","last_synced_at":"2026-04-04T18:14:01.653Z","repository":{"id":66976616,"uuid":"603859036","full_name":"ghazi-git/flake8-custom-error-messages","owner":"ghazi-git","description":"A flake8 plugin to customize the error messages emitted by other flake8 plugins","archived":false,"fork":false,"pushed_at":"2025-12-06T09:52:26.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-10T03:12:42.932Z","etag":null,"topics":["custom-error-messages","flake8","flake8-plugin"],"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/ghazi-git.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-19T19:16:45.000Z","updated_at":"2025-12-06T09:52:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"2404d0c9-ec27-4454-b05c-4fd972f94681","html_url":"https://github.com/ghazi-git/flake8-custom-error-messages","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"abaa37d280abdd13103f6f93eeafbd3a81ff9b9d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ghazi-git/flake8-custom-error-messages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghazi-git%2Fflake8-custom-error-messages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghazi-git%2Fflake8-custom-error-messages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghazi-git%2Fflake8-custom-error-messages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghazi-git%2Fflake8-custom-error-messages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghazi-git","download_url":"https://codeload.github.com/ghazi-git/flake8-custom-error-messages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghazi-git%2Fflake8-custom-error-messages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31407823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["custom-error-messages","flake8","flake8-plugin"],"created_at":"2026-04-04T18:14:01.043Z","updated_at":"2026-04-04T18:14:01.631Z","avatar_url":"https://github.com/ghazi-git.png","language":"Python","readme":"# flake8-custom-error-messages\n\nA [flake8](https://github.com/pycqa/flake8) plugin to customize the error messages emitted by other flake8 plugins\n\n## Installation\n\nInstall with `pip`\n\n```shell\npip install flake8-custom-error-messages\n```\n\n## Configuration Options\n\nThe package has one configuration option `--custom-error-messages \"\u003ccode\u003e [\u003cnew_msg\u003e\" \"\u003ccode\u003e \u003cnew_msg\u003e\", ]` that\ncan have multiple values. Each one of them should start with the error code followed by a space and after that\ncomes the new message to be displayed. You can also interpolate the original message as well.\n\n```shell\nflake8 some_file.py --format=custom_error_messages --custom-error-messages \"TST000 {original_message} For more info,\\\n    check the styleguide at https://some-domain.com\" \"DTZ005 Use django.utils.timezone.now() instead of datetime.now()\"\n```\n\nGiven that you might be overriding multiple error messages, adding that to a configuration file is better than\nspecifying them as part of the flake8 command. Each message should be in its own line (messages cannot span\nmultiple lines).\n```ini\n# setup.cfg or tox.ini or .flake8\n[flake8]\nformat = custom_error_messages\ncustom-error-messages =\n    TST000 {original_message} For more info, check the styleguide at https://some-domain.com\n    DTZ005 Use django.utils.timezone.now() instead of datetime.now()\n```\n\n## Motivation\n\nAs a project grows and based on the libraries or framework it uses, it makes sense to change the default error\nmessages emitted by flake8 plugins to recommend best practices followed by the project in question rather than\na generic message. For example, adding a link to a style guide or best practices document adopted by the project.\nAnother example is when a framework provides helpers to better deal with the issue in question: instead of the\ndefault messages emitted by [flake8-datetimez](https://github.com/pjknkda/flake8-datetimez#list-of-warnings)\nand when the project already relies on Django, it's better to recommend using helpers from the `django.utils.timezone`\nmodule.\n\n## Usage with pre-commit\n\n```yaml\nrepos:\n  - repo: https://github.com/pycqa/flake8\n    rev: '6.0.0'\n    hooks:\n      - id: flake8\n        args: [\n          --format,\n          'custom_error_messages',\n          --custom-error-messages,\n          'DTZ005 Use django.utils.timezone.now() instead of datetime.now()',\n          'TST000 {original_message} For more info, check the styleguide at https://some-domain.com'\n        ]\n        additional_dependencies: [ \"flake8-custom-error-messages==0.1.1\" ]\n```\n\n## License\n\nThis project is [MIT licensed](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghazi-git%2Fflake8-custom-error-messages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghazi-git%2Fflake8-custom-error-messages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghazi-git%2Fflake8-custom-error-messages/lists"}