Skip to main content

A Python library that prevents defining female-related names in code

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

please_do_not_define-0.3.3.tar.gz (49.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

please_do_not_define-0.3.3-py3-none-any.whl (49.0 kB view details)

Uploaded Python 3

File details

Details for the file please_do_not_define-0.3.3.tar.gz.

File metadata

  • Download URL: please_do_not_define-0.3.3.tar.gz
  • Upload date:
  • Size: 49.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for please_do_not_define-0.3.3.tar.gz
Algorithm Hash digest
SHA256 6f6dea5383b5313ba92efa58320a3e32e3292eec82b4e914f646eb8ef383e1a7
MD5 3b53b048f1e2d09129456d478a4a416a
BLAKE2b-256 fcd88e14f88bd61f49fadf803fbaca8a1bb3fe9ee3b9e5ec80ddca5fd6a957f2

See more details on using hashes here.

File details

Details for the file please_do_not_define-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for please_do_not_define-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b378d7d961032045990cff0fe4c0fd4fe28406fc658b1cd1f4b391c265f2a430
MD5 c5dd1a565a854a9c2f9bc81ce08dedd4
BLAKE2b-256 814a8ca53a7e0f95edd01b8a2148758ca0a6d08dc6897f507d807994c74b708a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page