GitXplorerGitXplorer
a

flake8-pytest-importorskip

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
0b99dbc50cf234b9bcd730b3103ec7d0d6a1d264

Merge pull request #3 from ashb/use-spies

aashb committed 4 years ago
Unverified
001d6def44f40cc54dfe2e55b85106152ff7021e

Replace hacky solution with spies from KGB module

aashb committed 4 years ago
Verified
b9af3c40ab9ba2d65aa0b8a6e8be9992702f3da3

Merge pull request #2 from ashb/black-settings-in-pyproject

aashb committed 4 years ago
Unverified
31d543019bf3da6f1daa9566743c6c49853026bc

Move Black code formatting settings in to pyproject.toml

aashb committed 4 years ago
Verified
cecbe263fc9a3db6d678a29121aa432de2ecd469

Merge pull request #1 from ashb/help-to-makefile

aashb committed 4 years ago
Unverified
40a5d42ee71f5a487cddaa4c2caa5d05852ebd65

Add help to Makefile

aashb committed 4 years ago

README

The README file for this repository.

flake8-pytest-importorskip

pypi Python: 3.6+ Downloads Build Status Code coverage License: Apache 2.0 Code style: black

Description

Treat pytest.importorskip as an import statement, not code, to silence the "module level import not at top of file" (E402) from pycodestyle

It allows code such as this to pass without having to globally disable E402.

It does this in a slightly hacky way (see the docs of kgb for details) , so it may break in future versions of pycodestyle.

Checks:

None

Installation

pip install flake8-pytest-importorskip

Usage

flake8 <your code>

For developers

Create venv and install deps

make init

Install git precommit hook

make precommit_install

Run linters, autoformat, tests etc.

make pretty lint test

Bump new version

make bump_major
make bump_minor
make bump_patch

License

Apache 2.0

Change Log

Unreleased

  • Replace accing private state of flake8 plugins with wrapping/spying on function, using kgb

1.0.0 - 2021-02-19

  • initial