Yet another styleguide.
Project description
yastyleguide
Yet another styleguide
Install
From gitlab pypi repository:
Create gitlab access token.
Go to page gitlab settings. Create gitlab access token with scopes:
- api
- read-api
- read_registry
- write_registry
Set poetry http-basic authentication by token:
poetry config http-basic.yastyleguide <gitlab-access-token-name> <gitlab-access-token>
Write to pyproject.toml:
[[tool.poetry.source]]
name = "yastyleguide"
url = "https://gitlab.com/api/v4/projects/31783240/packages/pypi/simple"
secondary = true
Install by poetry:
poetry add yastyleguide -D --source=yastyleguide
From source:
git clone https://gitlab.com/ds.team/general/yastyleguide
cd yastyleguide
poetry build
pip install dist/yastyleguide-0.0.3.tar.gz
From dist release:
unzip artifacts.zip
pip install dist/yastyleguide-0.0.3.tar.gz
From git:
poetry add git+https://gitlab.com/ds.team/general/yastyleguide
Публичный вариант
poetry add git+https://github.com/levkovalenko/yastyleguide
Nitpick styleguide
You can use base settings for linters with nitpick:
[tool.nitpick]
style = "https://gitlab.com/ds.team/general/yastyleguide/-/blob/master/styles/nitpick-yastyle.toml"
Публичный вариант
[tool.nitpick]
style = "https://raw.githubusercontent.com/levkovalenko/yastyleguide/master/styles/nitpick-yastyle.toml"
Running
It's just plugin flake8, so:
flake8 .
Violations
Our own codes:
Code | Description |
---|---|
YASG101 | Don't use any 'for' loops. |
YASG102 | Don't use any 'while' loops. |
YASG201 | Line is to complex, {0} > {1}. To many ast nodes per line. |
YASG202 | To big median line complexity in module, {0} > {1}. |
YASG203 | To many lines per module, {0} > {1}. |
YASG204 | To many function definitions per module, {0} > {1}. |
YASG205 | To many class definitions per module, {0} > {1}. |
You can read about external plugins violations at /docs/eng/plugin_list.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yastyleguide-0.0.5a0.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for yastyleguide-0.0.5a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c1607ae2032571bc6265e2cf5e19175caa761d192195cfcfcd05c0d2904ab13 |
|
MD5 | 5a17f2e1cc3571603d02b6151b29e926 |
|
BLAKE2b-256 | 13c167a8cc58d02d9101d09e0e37b8694a20814d70d762e5f0328cc1301e88a8 |