# please_do_not_define
Python library that prevents you from defining variables, functions or classes with names that contain female-related terms.
Now that a small number of women declare that they are undefinedable. The library will make sure that you won't offend them.
## Installation
`pip install please_do_not_define`
## Purpose
This library helps maintain gender-neutral naming in your Python code by detecting and blocking the use of female-related terms in variable, function, and class names.
## Features
- Scans Python code for names containing female-related terms
- Blocks execution if prohibited names are found
- Supports detection of both English and Chinese female-related terms
- Works with various file encodings
## Usage
Simply import the library in your Python script:
`import please_do_not_define`
The library will automatically scan your main script file when imported and raise a NameError if any prohibited names are found.
## Prohibited Terms
The library checks for names containing any of the following terms (case insensitive):
- Chinese Terms:
`女, 姑, 婆, 媳, 妇, 娘, 嬷, 姐, 妹, 嬢, 媛`
- English Terms:
`woman, women, girl, lady, Miss, Mrs, queen, female, she, her`
## Example
If your code contains:
```
def print_girl_name():
pass
```
The library will raise:
`NameError: name 'print_girl_name' is illegal. Please don't try to define a female.`
## bin
The bin name is `checkname`, the usage is as follows:
- `checkname filename` check whether your filename has the illegal name
- `checkname -s code` check whether your input code has the illegal name
- `checkname -v` show the version of the library
- `checkname -h` show the help information
## Note
This library is intended to satirize a point of view, not to actually express this.
## License
MIT
Raw data
{
"_id": null,
"home_page": "https://github.com/Locked-chess-official/please_do_not_define",
"name": "please-do-not-define",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "naming-conventions code-quality gender-neutral",
"author": "HuangHaoHua",
"author_email": "13140752715@163.com",
"download_url": "https://files.pythonhosted.org/packages/56/7b/bff3275a71c7975e5100f5cec060c629eb1857520c4f11bf20a4576330fb/please_do_not_define-0.3.6.tar.gz",
"platform": null,
"description": "# please_do_not_define\r\nPython library that prevents you from defining variables, functions or classes with names that contain female-related terms.\r\nNow that a small number of women declare that they are undefinedable. The library will make sure that you won't offend them.\r\n\r\n## Installation\r\n\r\n`pip install please_do_not_define`\r\n\r\n## Purpose\r\n\r\nThis library helps maintain gender-neutral naming in your Python code by detecting and blocking the use of female-related terms in variable, function, and class names.\r\n\r\n## Features\r\n- Scans Python code for names containing female-related terms\r\n\r\n- Blocks execution if prohibited names are found\r\n\r\n- Supports detection of both English and Chinese female-related terms\r\n\r\n- Works with various file encodings\r\n\r\n## Usage\r\n\r\nSimply import the library in your Python script:\r\n\r\n`import please_do_not_define`\r\n\r\nThe library will automatically scan your main script file when imported and raise a NameError if any prohibited names are found.\r\n\r\n## Prohibited Terms\r\n\r\nThe library checks for names containing any of the following terms (case insensitive):\r\n\r\n- Chinese Terms:\r\n\r\n`\u5973, \u59d1, \u5a46, \u5ab3, \u5987, \u5a18, \u5b37, \u59d0, \u59b9, \u5b22, \u5a9b`\r\n\r\n- English Terms:\r\n\r\n`woman, women, girl, lady, Miss, Mrs, queen, female, she, her`\r\n\r\n## Example\r\n\r\nIf your code contains:\r\n```\r\ndef print_girl_name():\r\n pass\r\n```\r\n\r\nThe library will raise:\r\n\r\n`NameError: name 'print_girl_name' is illegal. Please don't try to define a female.`\r\n\r\n## bin\r\n\r\nThe bin name is `checkname`, the usage is as follows:\r\n\r\n- `checkname filename` check whether your filename has the illegal name\r\n- `checkname -s code` check whether your input code has the illegal name\r\n- `checkname -v` show the version of the library\r\n- `checkname -h` show the help information\r\n\r\n## Note\r\n\r\nThis library is intended to satirize a point of view, not to actually express this.\r\n\r\n## License\r\n\r\nMIT\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python library that prevents defining female-related names in code",
"version": "0.3.6",
"project_urls": {
"Bug Reports": "https://github.com/Locked-chess-official/please_do_not_define/issues",
"Homepage": "https://github.com/Locked-chess-official/please_do_not_define",
"Source": "https://github.com/Locked-chess-official/please_do_not_define"
},
"split_keywords": [
"naming-conventions",
"code-quality",
"gender-neutral"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "57de90d18258768a8a76eb568b66d069d41349add25c8ca06d3ac200c970d3ee",
"md5": "01640c774c16aaf667afe24a1be4b6a8",
"sha256": "2583b2f4720ef1faa19dc16265edfb1d06d46bdbd697e4a8309322ca83eb8175"
},
"downloads": -1,
"filename": "please_do_not_define-0.3.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "01640c774c16aaf667afe24a1be4b6a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 6854,
"upload_time": "2025-09-15T01:16:57",
"upload_time_iso_8601": "2025-09-15T01:16:57.809048Z",
"url": "https://files.pythonhosted.org/packages/57/de/90d18258768a8a76eb568b66d069d41349add25c8ca06d3ac200c970d3ee/please_do_not_define-0.3.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "567bbff3275a71c7975e5100f5cec060c629eb1857520c4f11bf20a4576330fb",
"md5": "f525767a98c0fc566cecb55ae76e8787",
"sha256": "7780c5a543fcf49842fe32f3f1b154e0d5aa6ca5e6789d8c220a4e305825c016"
},
"downloads": -1,
"filename": "please_do_not_define-0.3.6.tar.gz",
"has_sig": false,
"md5_digest": "f525767a98c0fc566cecb55ae76e8787",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 49275,
"upload_time": "2025-09-15T01:16:59",
"upload_time_iso_8601": "2025-09-15T01:16:59.336668Z",
"url": "https://files.pythonhosted.org/packages/56/7b/bff3275a71c7975e5100f5cec060c629eb1857520c4f11bf20a4576330fb/please_do_not_define-0.3.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-15 01:16:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Locked-chess-official",
"github_project": "please_do_not_define",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "please-do-not-define"
}