summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 09:48:57 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 09:48:57 +0000
commitef8ab456409a6a618634bc1b43caa531658bb590 (patch)
treed72f2618e18fc4708468d283aab7954b314d6872
parent1358c7a0d15f901d51fb26dcdcac4394431e19aa (diff)
automatic import of python-flake8-annotations-coverageopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-flake8-annotations-coverage.spec292
-rw-r--r--sources1
3 files changed, 294 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..6b2d5dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/flake8_annotations_coverage-0.0.6.tar.gz
diff --git a/python-flake8-annotations-coverage.spec b/python-flake8-annotations-coverage.spec
new file mode 100644
index 0000000..2921086
--- /dev/null
+++ b/python-flake8-annotations-coverage.spec
@@ -0,0 +1,292 @@
+%global _empty_manifest_terminate_build 0
+Name: python-flake8-annotations-coverage
+Version: 0.0.6
+Release: 1
+Summary: A flake8 extension that checks for type annotations coverage
+License: MIT
+URL: https://github.com/best-doctor/flake8-annotations-coverage
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/45/c4/b886d34b99909a65eb2d2be6aca8359a2826b436f4635ed58807a31f7524/flake8_annotations_coverage-0.0.6.tar.gz
+BuildArch: noarch
+
+Requires: python3-flake8
+
+%description
+# flake8-annotations-coverage
+
+[![Build Status](https://github.com/best-doctor/flake8-annotations-coverage/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/best-doctor/flake8-annotations-coverage/actions/workflows/build.yml)
+[![Maintainability](https://api.codeclimate.com/v1/badges/8480286aaae1c0612351/maintainability)](https://codeclimate.com/github/best-doctor/flake8-annotations-coverage/maintainability)
+[![Test Coverage](https://api.codeclimate.com/v1/badges/8480286aaae1c0612351/test_coverage)](https://codeclimate.com/github/best-doctor/flake8-annotations-coverage/test_coverage)
+
+An extension for flake8 to report on files with a lot of code
+without type annotations.
+
+This is mostly useful when you add type annotations to existing
+large codebase and want to know if new code in annotated modules
+ is annotated.
+
+Minimal annotations coverage percentage for each file can be configured via
+`--min-coverage-percents` option, default is 75.
+
+Function is treated as annotated if it has annotation for at least
+one argument or return type. This is enough for mypy to threat the function
+not as dynamically typed.
+
+## Installation
+
+```bash
+pip install flake8-annotations-coverage
+```
+
+## Example
+
+Sample file:
+
+```python
+# test.py
+
+def annotated_function(some_arg: int):
+ pass
+
+
+def unannotated_function():
+ pass
+```
+
+Usage:
+
+```terminal
+$ flake8 test.py
+test.py:0:1: TAE001 too few type annotations
+```
+
+## Error codes
+
+| Error code | Description |
+|:----------:|:--------------------------------:|
+| TAE001 | Too few type annotations in file |
+
+## Contributing
+
+We would love you to contribute to our project. It's simple:
+
+1. Create an issue with bug you found or proposal you have.
+ Wait for approve from maintainer.
+1. Create a pull request. Make sure all checks are green.
+1. Fix review comments if any.
+1. Be awesome.
+
+Here are useful tips:
+
+- You can run all checks and tests with `make check`.
+ Please do it before CI does.
+- We use [BestDoctor python styleguide](https://github.com/best-doctor/guides/blob/master/guides/en/python_styleguide.md).
+- We respect [Django CoC](https://www.djangoproject.com/conduct/).
+ Make soft, not bullshit.
+
+
+
+
+%package -n python3-flake8-annotations-coverage
+Summary: A flake8 extension that checks for type annotations coverage
+Provides: python-flake8-annotations-coverage
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-flake8-annotations-coverage
+# flake8-annotations-coverage
+
+[![Build Status](https://github.com/best-doctor/flake8-annotations-coverage/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/best-doctor/flake8-annotations-coverage/actions/workflows/build.yml)
+[![Maintainability](https://api.codeclimate.com/v1/badges/8480286aaae1c0612351/maintainability)](https://codeclimate.com/github/best-doctor/flake8-annotations-coverage/maintainability)
+[![Test Coverage](https://api.codeclimate.com/v1/badges/8480286aaae1c0612351/test_coverage)](https://codeclimate.com/github/best-doctor/flake8-annotations-coverage/test_coverage)
+
+An extension for flake8 to report on files with a lot of code
+without type annotations.
+
+This is mostly useful when you add type annotations to existing
+large codebase and want to know if new code in annotated modules
+ is annotated.
+
+Minimal annotations coverage percentage for each file can be configured via
+`--min-coverage-percents` option, default is 75.
+
+Function is treated as annotated if it has annotation for at least
+one argument or return type. This is enough for mypy to threat the function
+not as dynamically typed.
+
+## Installation
+
+```bash
+pip install flake8-annotations-coverage
+```
+
+## Example
+
+Sample file:
+
+```python
+# test.py
+
+def annotated_function(some_arg: int):
+ pass
+
+
+def unannotated_function():
+ pass
+```
+
+Usage:
+
+```terminal
+$ flake8 test.py
+test.py:0:1: TAE001 too few type annotations
+```
+
+## Error codes
+
+| Error code | Description |
+|:----------:|:--------------------------------:|
+| TAE001 | Too few type annotations in file |
+
+## Contributing
+
+We would love you to contribute to our project. It's simple:
+
+1. Create an issue with bug you found or proposal you have.
+ Wait for approve from maintainer.
+1. Create a pull request. Make sure all checks are green.
+1. Fix review comments if any.
+1. Be awesome.
+
+Here are useful tips:
+
+- You can run all checks and tests with `make check`.
+ Please do it before CI does.
+- We use [BestDoctor python styleguide](https://github.com/best-doctor/guides/blob/master/guides/en/python_styleguide.md).
+- We respect [Django CoC](https://www.djangoproject.com/conduct/).
+ Make soft, not bullshit.
+
+
+
+
+%package help
+Summary: Development documents and examples for flake8-annotations-coverage
+Provides: python3-flake8-annotations-coverage-doc
+%description help
+# flake8-annotations-coverage
+
+[![Build Status](https://github.com/best-doctor/flake8-annotations-coverage/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/best-doctor/flake8-annotations-coverage/actions/workflows/build.yml)
+[![Maintainability](https://api.codeclimate.com/v1/badges/8480286aaae1c0612351/maintainability)](https://codeclimate.com/github/best-doctor/flake8-annotations-coverage/maintainability)
+[![Test Coverage](https://api.codeclimate.com/v1/badges/8480286aaae1c0612351/test_coverage)](https://codeclimate.com/github/best-doctor/flake8-annotations-coverage/test_coverage)
+
+An extension for flake8 to report on files with a lot of code
+without type annotations.
+
+This is mostly useful when you add type annotations to existing
+large codebase and want to know if new code in annotated modules
+ is annotated.
+
+Minimal annotations coverage percentage for each file can be configured via
+`--min-coverage-percents` option, default is 75.
+
+Function is treated as annotated if it has annotation for at least
+one argument or return type. This is enough for mypy to threat the function
+not as dynamically typed.
+
+## Installation
+
+```bash
+pip install flake8-annotations-coverage
+```
+
+## Example
+
+Sample file:
+
+```python
+# test.py
+
+def annotated_function(some_arg: int):
+ pass
+
+
+def unannotated_function():
+ pass
+```
+
+Usage:
+
+```terminal
+$ flake8 test.py
+test.py:0:1: TAE001 too few type annotations
+```
+
+## Error codes
+
+| Error code | Description |
+|:----------:|:--------------------------------:|
+| TAE001 | Too few type annotations in file |
+
+## Contributing
+
+We would love you to contribute to our project. It's simple:
+
+1. Create an issue with bug you found or proposal you have.
+ Wait for approve from maintainer.
+1. Create a pull request. Make sure all checks are green.
+1. Fix review comments if any.
+1. Be awesome.
+
+Here are useful tips:
+
+- You can run all checks and tests with `make check`.
+ Please do it before CI does.
+- We use [BestDoctor python styleguide](https://github.com/best-doctor/guides/blob/master/guides/en/python_styleguide.md).
+- We respect [Django CoC](https://www.djangoproject.com/conduct/).
+ Make soft, not bullshit.
+
+
+
+
+%prep
+%autosetup -n flake8-annotations-coverage-0.0.6
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-flake8-annotations-coverage -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.6-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..818751a
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+62f0bf3dbe1b43ca0950aaa0d98f5dff flake8_annotations_coverage-0.0.6.tar.gz