Skip to main content

pcsFilter

Tool for filtering out Python Code Smells by formatting the code and checking the code style after.


pcsFilter is a wrapper around the following tools:

  1. blue
  2. isort
  3. flake8
  4. radon ("cc" command)

pcsFilter runs mentioned tools in a given order. The following functionality is applied on top:

  1. flake8 number of issues with details and radon cc score are saved upon the first run to ./.pcsFilter folder. The ./.pcsFilter folder path is default and can be overriden via the output path option (-o or --output-path).
  2. When pcsFilter is executed again the new results are compared with the previous ones.
  3. If new results are worse then:
    1. a short message will be printed
    2. if "strict" (-s or --strict) option is used then:
      • pcsFilter will exit with status = 1
  4. New scores and their details will be saved to a default or given output path.

Usage

Shell

Installation

pip install pcsFilter

Base command

pcsFilter <path to project or file>

Strict

Fail with status = 1, when new scores are worse. Has no effect during the first run.

pcsFilter -s <path to project or file>
pcsFilter --strict <path to project or file>

Override output path

Default output path is ./.pcsFilter. It can be overriden the following way:

pcsFilter -o <new output path> <path to project or file>
pcsFilter --output-path <new output path> <path to project or file>

Help message

pcsFilter --help

Docker

Installation

docker pull alexdbondarev/pcsfilter:latest

Base command

docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest <path to project or file>

Strict

Fail with status = 1, when new scores are worse. Has no effect during the first run.

docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest -s <path to project or file>
docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest --strict <path to project or file>

Override output path

Default output path is ./.pcsFilter. It can be overriden the following way:

docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest -o <new output path> <path to project or file>
docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest --output-path <new output path> <path to project or file>

Help message

docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest --help

Contributing

Any contribution is always welcome!
Please follow this code of conduct.
This doc explains contribution details.

Metadata

Release files for pcsFilter 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pcsFilter 1.0.4
File Size Uploaded Provenance Actions
pcsfilter-1.0.4.tar.gz 7.5 kB Without provenance Details for pcsfilter-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pcsFilter 1.0.4
File Interpreter ABI Platform Actions
pcsfilter-1.0.4-py3-none-any.whl Python 3 none any Details for pcsfilter-1.0.4-py3-none-any.whl

Total release size: 18.5 kB

Release files / pcsfilter-1.0.4.tar.gz

Download URL pcsfilter-1.0.4.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4a91a08e023d50a2d297650ad3d0a9d93295143e07ecfe0cabada67a9ad58d7c
BLAKE2b-256 checksum
How to use checksums
f4fa1fe47c6829ee36644829646f272bf5a4a50269c0f4294ea634d85cf79b6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1012-azure

Release files / pcsfilter-1.0.4-py3-none-any.whl

Download URL pcsfilter-1.0.4-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4aecfba9fd4f011662872775112ccb92822de1fa777b9a6a06eeee9da3f52cb
BLAKE2b-256 checksum
How to use checksums
90ac79c2d5c36706e685d32494d13a13f7bce288581524c26cd253e3b61053c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1012-azure

Security for pcsFilter 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page