McCabe complexity checker for Python

Ned’s script to check McCabe complexity. This module provides a plugin for flake8, the Python code checker. Installation You can install, upgrade, or uninstall mccabe with these commands: $ pip install mccabe $ pip install –upgrade mccabe $ pip uninstall mccabe Standalone script The complexity checker can be used directly: $ python -m mccabe –min 5 mccabe.py (“185:1: ‘PathGraphingAstVisitor.visitIf'”, 5) (“71:1: ‘PathGraph.to_dot'”, 5) (“245:1: ‘McCabeChecker.run'”, 5) (“283:1: ‘main'”, 7) (“203:1: ‘PathGraphingAstVisitor.visitTryExcept'”, 5) (“257:1: ‘get_code_complexity'”, 5) Plugin for Flake8 When both […]

Read more

Inspects Python source files and provides information about type and location of classes, methods etc

About Prospector is a tool to analyse Python code and output information about errors, potential problems, convention violations and complexity. It brings together the functionality of other Python analysis tools such as Pylint, pep8, and McCabe complexity. See the Supported Tools documentation section for a complete list. The primary aim of Prospector is to be useful ‘out of the box’. A common complaint of other Python analysis tools is that it takes a long time to filter    

Read more

A Python application for tracking, reporting on timing and complexity in Python code

A command-line application for tracking, reporting on complexity of Python tests and applications. wily [a]: quick to think of things, having a very good understanding of situations and possibilities, and often willing to use tricks to achieve an aim. Wily uses git to go through each revision (commit) in a branch and run complexity and code-analysis metrics over the code. You can use this to limit your code or report on trends for complexity, length etc. Installation Wily can be […]

Read more

Cohesion: A tool for measuring Python class cohesion

Cohesion is a tool for measuring Python class cohesion. In computer programming, cohesion refers to the degree to which the elements of a module belong together. Thus, cohesion measures the strength of relationship between pieces of functionality within a given module. For example, in highly cohesive systems functionality is strongly related. When cohesion is high, it means that the methods and variables of the class are co-dependent and hang together as a logical whole. Some of the advantages of high […]

Read more

Pretty-print tabular data in Python, a library and a command-line utility

Pretty-print tabular data in Python, a library and a command-line utility. The main use cases of the library are: printing small tables without hassle: just one function call, formatting is guided by the data itself authoring tabular data for lightweight plain-text markup: multiple output formats suitable for further editing or transformation readable presentation of mixed textual and numeric data: smart column alignment, configurable number formatting, alignment by a decimal point Installation To install the Python library and the command line […]

Read more

Structured Logging for Python

structlog makes logging in Python faster, less painful, and more powerful by adding structure to your log entries. It’s up to you whether you want structlog to take care about the output of your log entries or whether you prefer to forward them to an existing logging system like the standard library’s logging module. Once you feel inspired to try it out, check out our friendly Getting Started tutorial that also contains detailed installation instructions! If you prefer videos over […]

Read more

A progress bar for Python 2 and Python 3 – pip install progressbar2

Travis status: Coverage: Install The package can be installed through pip (this is the recommended method): pip install progressbar2 Or if pip is not available, easy_install should work as well: easy_install progressbar2 Or download the latest release from Pypi (https://pypi.python.org/pypi/progressbar2) or Github. Note that the releases on Pypi are signed with my GPG key (https://pgp.mit.edu/pks/lookup?op=vindex&search=0xE81444E9CE1F695D) and can be checked using GPG: gpg –verify progressbar2-.tar.gz.asc progressbar2-.tar.gz Introduction A text progress bar is typically used to display the progress of a long […]

Read more

Json Formatter for the standard python logger

This library is provided to allow standard python logging to output log data as json objects. With JSON we can make our logs more readable by machines and we can stop writing custom parsers for syslog type records. Hi, I see this package is quiet alive and I am sorry for ignoring it so long. I will be stepping up my maintenance of this package so please allow me a week to get things back in order (and most likely […]

Read more

The NLP Cypher | 11.21.21

Hey … so have you ever deployed a state-of-the-art production level inference server? Don’t know how to do it? Well… last week, Michael Benesty dropped a bomb when he published one of the first ever detailed blogs on how to not only deploy a production level inference API but benchmarking some of the most widely used frameworks such as FastAPI and Triton servers and runtime engines such as ONNX runtime (ORT) and TensorRT (TRT). Eventually, Michael recreated Hugging Face’s ability […]

Read more
1 356 357 358 359 360 928