{"id":25869959,"url":"https://github.com/melevir/flake8-functions-names","last_synced_at":"2026-09-27T15:30:23.803Z","repository":{"id":43451639,"uuid":"349808929","full_name":"Melevir/flake8-functions-names","owner":"Melevir","description":"An extension for flake8 that validates functions names, decomposition and conformity with annotations.","archived":false,"fork":false,"pushed_at":"2023-03-13T11:34:19.000Z","size":44,"stargazers_count":28,"open_issues_count":9,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-09-10T08:38:13.342Z","etag":null,"topics":["code-style","contract","flake8","flake8-plugin","styleguide"],"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/Melevir.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-20T18:46:11.000Z","updated_at":"2026-09-05T03:56:57.000Z","dependencies_parsed_at":"2024-01-06T09:57:49.413Z","dependency_job_id":"4839e97b-cc79-45d3-ba12-53116cd416b5","html_url":"https://github.com/Melevir/flake8-functions-names","commit_stats":{"total_commits":51,"total_committers":7,"mean_commits":7.285714285714286,"dds":"0.17647058823529416","last_synced_commit":"5285edbefcdd48bf3a41cabcd48e845dfae504a0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Melevir/flake8-functions-names","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Melevir%2Fflake8-functions-names","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Melevir%2Fflake8-functions-names/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Melevir%2Fflake8-functions-names/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Melevir%2Fflake8-functions-names/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Melevir","download_url":"https://codeload.github.com/Melevir/flake8-functions-names/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Melevir%2Fflake8-functions-names/sbom","scorecard":{"id":92615,"data":{"date":"2025-08-11","repo":{"name":"github.com/Melevir/flake8-functions-names","commit":"5285edbefcdd48bf3a41cabcd48e845dfae504a0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":3,"reason":"Found 6/20 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/Melevir/flake8-functions-names/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/Melevir/flake8-functions-names/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/Melevir/flake8-functions-names/main.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:32","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:38","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T08:11:49.265Z","repository_id":43451639,"created_at":"2025-08-15T08:11:49.265Z","updated_at":"2025-08-15T08:11:49.265Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":341189360,"owners_count":37763239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-22T15:14:58.755Z","status":"online","status_checked_at":"2026-09-27T02:00:07.257Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["code-style","contract","flake8","flake8-plugin","styleguide"],"created_at":"2025-03-02T05:29:20.439Z","updated_at":"2026-09-27T15:30:23.468Z","avatar_url":"https://github.com/Melevir.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flake8-functions-names\n\n[![PyPI version](https://badge.fury.io/py/flake8-functions-names.svg)](https://badge.fury.io/py/flake8-functions-names)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flake8-functions-names)\n\nAn extension for flake8 that validates functions names, decomposition and\nconformity with annotations. The plugin also has some validations\nof [deal](https://github.com/life4/deal) contracts.\n\nThis plugin helps to provide better naming for functions.\nThe validations are based on my articles:\n\n- [Python functions naming: an algorithm](https://melevir.medium.com/python-functions-naming-the-algorithm-74320a18278d)\n- [Python functions naming: 10 tips](https://melevir.medium.com/python-functions-naming-tips-376f12549f9)\n\n`deal`-related validations are enabled only if `deal` is installed.\nThey are disabled otherwise.\n\n## Installation\n\n```terminal\npip install flake8-functions-names\n```\n\n## Example\n\n```python\ndef is_user_banned(user: User) -\u003e str:\n    return 'is_banned' if user.id in BANNED_USERS else 'not_banned'\n\ndef save_user(user: User) -\u003e None:\n    user.save()\n```\n\nUsage:\n\n```terminal\n$ flake8 test.py\ntext.py:1:35: FNE001 Name of the function says that it should return bool-like, but it returns str\ntext.py:4:4: FNE003 Name of the function uses \"save\", but not uses \"to\"\n```\n\nTested on Python 3.8+ and flake8 3.9+.\n\n## Error codes\n\n| Error code |                     Description          |\n|:----------:|:----------------------------------------:|\n|   FNE001   | Name of the function says that it should return `bool-like`[^1], but it returns *actual_type* |\n|   FNE002   | The method has a `@property` decorator, but has a verb in it's name (*verb*) |\n|   FNE003   | Name of the function uses `save`, but not uses `to` |\n|   FNE004   | Name of the function uses `load`, but not uses `from` |\n|   FNE005   | Return type of the function is `bool-like`[^1], but the name doesn't show it |\n|   FNE006   | Name of function says, that it works with data, so it should be pure, but it has no `@deal.pure()` |\n|   FNE007   | `and` is not recommended in functions names |\n|   FNE008   | Name of functions ends with it's first argument name |\n\n[^1]: bool-like return types: bool, TypeGuard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelevir%2Fflake8-functions-names","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelevir%2Fflake8-functions-names","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelevir%2Fflake8-functions-names/lists"}