Skip to main content

No project description provided

Project description

loguru-mypy

A fancy plugin to boost up your logging with loguru

GitHub Workflow Status (branch) Open Source Helpers PyPI PyPI - Downloads time tracker Checked with mypy

mypy compatibility

logoru-mypy should be compatible with mypy>=0.770. Currently there is no limit as far as the compatibility can go. If you are interested to see how far loguru_mypy goes you can visit CI/CD action and check its matrix.

Installation

Simply execute:

pip install loguru-mypy

And later on modify your mypy.ini configuration file with

[mypy]
plugins = loguru_mypy

That is all, your code is now ready to be linted.

What is included?

loguru-mypy is obviously a mypy plugin that allows to avoid some of those little runtime trickeries :). Here is a short attempt to list some of those:

Lazy loggers

logger.opt(lazy=True) in facts returns a logger that we call lazy. Lazy loggers accept only typing.Callable[[], t.Any] in place of positional or named arguments. Passing a callable that accepts even a single argument thus results in runtime error. loguru-mypy detects that fact and lets you know before your runtime reaches that portion of a code.

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

loguru-mypy-0.0.4.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

loguru_mypy-0.0.4-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

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