Skip to content

Commit 5f53c05

Browse files
authored
Prepare for 1.0.0 release (#2)
* Add py.typed * Add flake8-pytest-style * Add downloads badge
1 parent d11979b commit 5f53c05

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ repos:
2626
- flake8-bugbear~=21.4.3
2727
- pep8-naming~=0.11.1
2828
- flake8-annotations~=2.6.2
29+
- flake8-pytest-style==1.5.0

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# flake8-qgis
22
[![PyPI version](https://badge.fury.io/py/flake8-qgis.svg)](https://badge.fury.io/py/flake8-qgis)
3+
[![Downloads](https://img.shields.io/pypi/dm/flake8-qgis.svg)](https://pypistats.org/packages/flake8-qgis)
34
![CI](https://github.com/GispoCoding/flake8-qgis/workflows/CI/badge.svg)
45
[![Code on Github](https://img.shields.io/badge/Code-GitHub-brightgreen)](https://github.com/GispoCoding/flake8-qgis)
56
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

flake8_qgis/py.typed

Whitespace-only changes.

setup.cfg

+10-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ install_requires =
4040
importlib-metadata>=0.9;python_version<"3.8"
4141
astor>=0.1
4242

43+
[options.package_data]
44+
* =
45+
py.typed
46+
4347
[options.entry_points]
4448
flake8.extension =
4549
QGS=flake8_qgis:Plugin
@@ -53,8 +57,12 @@ ignore = D104, D105, D107, D301, D413, D203, D212, D100
5357

5458
[flake8]
5559
max_line_length = 88
56-
exclude = tests/*,.tox/*,.nox/*,docs/*
57-
ignore = H301,H306,H404,H405,W503,D105,D413,D103,D107,E252,N803,E203,C416,A001,A003,P102,ANN101
60+
per-file-ignores =
61+
tests/*:ANN001,ANN201,N802
62+
extend-ignore =
63+
E203, # whitespace before ':'
64+
ANN101, # Missing type annotation for self in method
65+
PT004 # fixture '{name}' does not return anything, add leading underscore
5866

5967
[isort]
6068
import_heading_stdlib=Core Library modules

tests/test_flake8_qgis.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ def some_method(somearg, iface):
147147
pass
148148
"""
149149
)
150-
assert len(ret) == 1 and list(ret)[0].endswith(
150+
assert len(ret) == 1
151+
assert list(ret)[0].endswith(
151152
"QGS105 Do not pass iface (QgisInterface) as an argument, instead import "
152153
"it: 'from qgis.utils import iface'"
153154
)

0 commit comments

Comments
 (0)