Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pylint-google-style-guide-imports-enforcing

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pylint-google-style-guide-imports-enforcing

Plugin for PyLint that checks if we import only modules or packages. Direct imports of classes, functions and constants are forbidden

  • 1.3.0
  • PyPI
  • Socket score

Maintainers
1

How it works?

It marks importing anything but modules/packages as invalid with a message only-importing-modules-is-allowed. This adheres to Google's Python style guide.

An example::

from functools import partial  # invalid
import functools  # valid
from some_module.some_subomdule import SomeClass  # invalid
from some_module import some_subomdule  # valid

Why?

To not force people to manual check if something we imported is a module or not.

How to use it?

After installing a package just run pylint, appending pylint_google_style_guide_imports_enforcing to your --load-plugins option.

An example::

pylint my_cool_project --load-plugins=pylint_google_style_guide_imports_enforcing

or append it to your pylintrc file::

[MASTER]
load-plugins=pylint_google_style_guide_imports_enforcing

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc