Skip to main content

A Flake8 plugin to require __slots__ to be defined for subclasses of immutable types.

Project description

A Flake8 plugin to require __slots__ to be defined for subclasses of immutable types.

Docs

Documentation Build Status Docs Check Status

Tests

Linux Test Status Windows Test Status macOS Test Status Coverage

PyPI

PyPI - Package Version PyPI - Supported Python Versions PyPI - Supported Implementations PyPI - Wheel

Anaconda

Conda - Package Version Conda - Platform

Activity

GitHub last commit GitHub commits since tagged version Maintenance PyPI - Downloads

QA

CodeFactor Grade Flake8 Status mypy status pre-commit.ci status

Other

License GitHub top language Requirements Status

Installation

flake8-slots can be installed from PyPI or Anaconda.

To install with pip:

$ python -m pip install flake8-slots

To install with conda:

  • First add the required channels

$ conda config --add channels http://conda.anaconda.org/conda-forge
$ conda config --add channels http://conda.anaconda.org/domdfcoding
  • Then install

$ conda install flake8-slots

Flake8 codes

Code

Description

SLOT000

Define __slots__ for subclasses of str

SLOT001

Define __slots__ for subclasses of tuple

SLOT002

Define __slots__ for subclasses of collections.namedtuple

Use as a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

- repo: https://gitlab.com/pycqa/flake8
  rev: 3.8.1
  hooks:
   - id: flake8
     additional_dependencies: [flake8-slots==0.1.4]

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

flake8_slots-0.1.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_slots-0.1.4-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file flake8_slots-0.1.4.tar.gz.

File metadata

  • Download URL: flake8_slots-0.1.4.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for flake8_slots-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8930768c637e774d1b7a64b4ed5c57a0edb7ca9b5342f83181620a010a773595
MD5 83b6846bdf9a6e2db2396571c8229e13
BLAKE2b-256 6c89c509c992d9ade9e2355ec72b4b03682b3b7f348416c38fa3b0811753bb49

See more details on using hashes here.

File details

Details for the file flake8_slots-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: flake8_slots-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for flake8_slots-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c5b48385386b3e75e0094a706ca70f06b61343eaac6b846c7185ec345da98884
MD5 0610a91aeb669f6b87f95fbf2ff71cd3
BLAKE2b-256 be45812110ba671946c377fb71217ace0d09018607944d888c67f69d03943201

See more details on using hashes here.

Supported by

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