Skip to main content

yina

A simple, yet opinionated linter for Python that helps you choose more descriptive variable names.

pip install yina


Button Hover Button Hover


Usage

  • Run yina lint file.py to lint a file or yina lint src/ for a directory.
  • Use the --level N option to specify the strictness level. Defaults to level 3.
  • With yina init you can generate a configuration file for the working directory with default values you can edit.

Strictness levels

Yina lint operates on 5 strictness levels. Each level includes all the rules from the previous levels.

Level Rules
Level 1: Length and charset - Variables must be at least 3 characters long.
- Variables can only contain characters: a-Z, A-Z, 0-9 and _.
- Variables cannot start with a number.
Level 2: Naming conventions - Snake case will be enforced for regular variables and camel case for class names.
- All constants must be fully capitalized.
- Snake case variables that are not constants cannot have capital letters.
Level 3 (default): Word length, max length, repetition - Max variable length: 32 characters.
- No more than 2 underscores in a row.
- Applied for each "word" in a variable name, like "one" in "one_two_three":
  - No more than 2 of the same letter in a row.
  - At least 3 characters long.
Level 4: Pronounceability - Applied for each "word" in a variable name, like "one" in "one_two_three":
  - At least one vowel
  - No more than 4 consonants in a row
Level 5: Non vagueness - No vague words like "item(s)", "thing(s)", "object(s)", "element(s)", "data", "value" or "result". "string" or "dataframe" are also disallowed. Applies only to the entire variable name, vague segments are allowed.
- No numbers.

Configuration

  • If there is a .yina.toml file in the working directory, it will be used.
  • If not, the default yina-lint/config/yina.toml file will be applied.

Download files

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

Source Distribution

yina-0.1.11.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

yina-0.1.11-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file yina-0.1.11.tar.gz.

File metadata

  • Download URL: yina-0.1.11.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yina-0.1.11.tar.gz
Algorithm Hash digest
SHA256 1bdc77c0466a05ed0d4460a2acec921b6724ba66bd862965bfd8ca66456f894e
MD5 cf22afaaa51c170f6c2cd837e378785b
BLAKE2b-256 33382b9a01ae419372a9b3d50cdde77889e15668e436b6aea1a44f42662388bd

See more details on using hashes here.

File details

Details for the file yina-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: yina-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yina-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 52a44b7eb9159372d5a2f8c25c010205e731b674335385c9b2415d62902f7348
MD5 ff08d5d6ad6690c86b27cf0c8b1189dd
BLAKE2b-256 528f3f093a50c43f567fd97c02f464c515c1032092524687008a0241ba4a60b6

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.11 This release

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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