summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 17:00:09 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 17:00:09 +0000
commit0fc721b4d52dbcda67fc16877ba9510aa75d54fe (patch)
tree6fc8ec49c83abef78639b4c5cb69a65aa735d397
parent6063fc662f8a66aebf8667bc5572ed7a3ce4f21b (diff)
automatic import of python-flake8-noqa
-rw-r--r--.gitignore1
-rw-r--r--python-flake8-noqa.spec267
-rw-r--r--sources1
3 files changed, 269 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..8a4244f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/flake8-noqa-1.3.1.tar.gz
diff --git a/python-flake8-noqa.spec b/python-flake8-noqa.spec
new file mode 100644
index 0000000..adbd7d2
--- /dev/null
+++ b/python-flake8-noqa.spec
@@ -0,0 +1,267 @@
+%global _empty_manifest_terminate_build 0
+Name: python-flake8-noqa
+Version: 1.3.1
+Release: 1
+Summary: Flake8 noqa comment validation
+License: GNU Lesser General Public License v3
+URL: https://pypi.org/project/flake8-noqa/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/4f/ac/5d1cd77a8b115e0d97c3ae2b3f2c21174b9feb6740ba43b99e1f11c93e92/flake8-noqa-1.3.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-flake8
+Requires: python3-typing-extensions
+Requires: python3-importlib-metadata
+Requires: python3-mypy
+Requires: python3-flake8
+Requires: python3-flake8-annotations
+Requires: python3-flake8-bandit
+Requires: python3-flake8-bugbear
+Requires: python3-flake8-commas
+Requires: python3-flake8-comprehensions
+Requires: python3-flake8-continuation
+Requires: python3-flake8-datetimez
+Requires: python3-flake8-docstrings
+Requires: python3-flake8-import-order
+Requires: python3-flake8-literal
+Requires: python3-flake8-noqa
+Requires: python3-flake8-polyfill
+Requires: python3-flake8-pyproject
+Requires: python3-flake8-modern-annotations
+Requires: python3-flake8-requirements
+Requires: python3-flake8-typechecking-import
+Requires: python3-flake8-use-fstring
+Requires: python3-pep8-naming
+Requires: python3-flake8-docstrings
+
+%description
+flake8 plugin to validate `# noqa` comments.
+flake8 is very particular about formatting of `# noqa` comments.
+If your `# noqa` isn't exactly what flake8 expects,
+it can easily cause your `# noqa` comment to be ignored.
+However, forgetting a colon or adding an extra space in the wrong place
+will turn a strict `# noqa: <code>` comment
+into a blanket `# noqa` comment,
+which is likely not what you intended.
+For example:
+`# noqa F841`,
+`# noqa : F841`,
+and `# noqa: F841`
+will be interpreted as `# noqa`
+and may, as a result,
+hide other errors you care about.
+This plugin looks for noqa comments
+that do not match the proper formatting
+so your `# noqa` comments work and do only what you expect them to.
+Optionally, it can also enforce usage of codes with all `# noqa` comments.
+In addition, this plugin looks for `# noqa` comments that are unnecessary
+because either there are no matching violations on the line
+or they contain codes that do not match existing violations.
+Errors reported by this module cannot be prevented via `# noqa` comments,
+otherwise you'd never see many of the errors it produces.
+Use `ignore`, `extend-ignore`, or `per-file-ignores` to ignore them as needed.
+Alternatively, if you have a comment that this plugin thinks is a
+`# noqa` with codes,
+but isn't,
+e.g. `# noqa : X100 is not a code`,
+you can make the comment look less like a proper `# noqa` comment.
+e.g. `# noqa - X100 is not a code`
+(flake8 will interpret both of those as `# noqa`).
+Usage Note:
+When determining if violations have matched a `# noqa` comment,
+this plugin requires flake8 to have been made aware of the violations
+that would otherwise apply.
+Some plugins do their own processing of `# noqa` comments
+and stop sending violation reports to flake8 when they see a `# noqa` comment.
+A plugin doing so will cause this plugin to stop seeing the violation,
+and it may report the lack of a violation or matching code.
+When you then remove the `# noqa` comment or violation code,
+the other plugin will resume sending the violation,
+prompting you to restore the `# noqa` comment or code.
+The best fix for this situation is to try to get the offending plugin
+to stop respecting `# noqa` comments.
+A plugin doing so is considered an anti-pattern,
+and it's best to allow flake8 to determine if violations should be
+surfaced to the user or not.
+The offending plugin may have an option to control this behavior
+(note the flake8 `--disable-noqa` option will disable *all* noqa comments,
+so is not a suitable fix for this situation).
+If the plugin does not have an option to control its `# noqa` behavior,
+the best course of action may be to contact the maintainers of
+the plugin via the appropriate issue reporting system.
+If the plugin is unmaintained,
+or the maintainers decline to address the issue for whatever reason,
+feel free to file an issue on this plugin
+to see if a work-around can be established.
+
+%package -n python3-flake8-noqa
+Summary: Flake8 noqa comment validation
+Provides: python-flake8-noqa
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-flake8-noqa
+flake8 plugin to validate `# noqa` comments.
+flake8 is very particular about formatting of `# noqa` comments.
+If your `# noqa` isn't exactly what flake8 expects,
+it can easily cause your `# noqa` comment to be ignored.
+However, forgetting a colon or adding an extra space in the wrong place
+will turn a strict `# noqa: <code>` comment
+into a blanket `# noqa` comment,
+which is likely not what you intended.
+For example:
+`# noqa F841`,
+`# noqa : F841`,
+and `# noqa: F841`
+will be interpreted as `# noqa`
+and may, as a result,
+hide other errors you care about.
+This plugin looks for noqa comments
+that do not match the proper formatting
+so your `# noqa` comments work and do only what you expect them to.
+Optionally, it can also enforce usage of codes with all `# noqa` comments.
+In addition, this plugin looks for `# noqa` comments that are unnecessary
+because either there are no matching violations on the line
+or they contain codes that do not match existing violations.
+Errors reported by this module cannot be prevented via `# noqa` comments,
+otherwise you'd never see many of the errors it produces.
+Use `ignore`, `extend-ignore`, or `per-file-ignores` to ignore them as needed.
+Alternatively, if you have a comment that this plugin thinks is a
+`# noqa` with codes,
+but isn't,
+e.g. `# noqa : X100 is not a code`,
+you can make the comment look less like a proper `# noqa` comment.
+e.g. `# noqa - X100 is not a code`
+(flake8 will interpret both of those as `# noqa`).
+Usage Note:
+When determining if violations have matched a `# noqa` comment,
+this plugin requires flake8 to have been made aware of the violations
+that would otherwise apply.
+Some plugins do their own processing of `# noqa` comments
+and stop sending violation reports to flake8 when they see a `# noqa` comment.
+A plugin doing so will cause this plugin to stop seeing the violation,
+and it may report the lack of a violation or matching code.
+When you then remove the `# noqa` comment or violation code,
+the other plugin will resume sending the violation,
+prompting you to restore the `# noqa` comment or code.
+The best fix for this situation is to try to get the offending plugin
+to stop respecting `# noqa` comments.
+A plugin doing so is considered an anti-pattern,
+and it's best to allow flake8 to determine if violations should be
+surfaced to the user or not.
+The offending plugin may have an option to control this behavior
+(note the flake8 `--disable-noqa` option will disable *all* noqa comments,
+so is not a suitable fix for this situation).
+If the plugin does not have an option to control its `# noqa` behavior,
+the best course of action may be to contact the maintainers of
+the plugin via the appropriate issue reporting system.
+If the plugin is unmaintained,
+or the maintainers decline to address the issue for whatever reason,
+feel free to file an issue on this plugin
+to see if a work-around can be established.
+
+%package help
+Summary: Development documents and examples for flake8-noqa
+Provides: python3-flake8-noqa-doc
+%description help
+flake8 plugin to validate `# noqa` comments.
+flake8 is very particular about formatting of `# noqa` comments.
+If your `# noqa` isn't exactly what flake8 expects,
+it can easily cause your `# noqa` comment to be ignored.
+However, forgetting a colon or adding an extra space in the wrong place
+will turn a strict `# noqa: <code>` comment
+into a blanket `# noqa` comment,
+which is likely not what you intended.
+For example:
+`# noqa F841`,
+`# noqa : F841`,
+and `# noqa: F841`
+will be interpreted as `# noqa`
+and may, as a result,
+hide other errors you care about.
+This plugin looks for noqa comments
+that do not match the proper formatting
+so your `# noqa` comments work and do only what you expect them to.
+Optionally, it can also enforce usage of codes with all `# noqa` comments.
+In addition, this plugin looks for `# noqa` comments that are unnecessary
+because either there are no matching violations on the line
+or they contain codes that do not match existing violations.
+Errors reported by this module cannot be prevented via `# noqa` comments,
+otherwise you'd never see many of the errors it produces.
+Use `ignore`, `extend-ignore`, or `per-file-ignores` to ignore them as needed.
+Alternatively, if you have a comment that this plugin thinks is a
+`# noqa` with codes,
+but isn't,
+e.g. `# noqa : X100 is not a code`,
+you can make the comment look less like a proper `# noqa` comment.
+e.g. `# noqa - X100 is not a code`
+(flake8 will interpret both of those as `# noqa`).
+Usage Note:
+When determining if violations have matched a `# noqa` comment,
+this plugin requires flake8 to have been made aware of the violations
+that would otherwise apply.
+Some plugins do their own processing of `# noqa` comments
+and stop sending violation reports to flake8 when they see a `# noqa` comment.
+A plugin doing so will cause this plugin to stop seeing the violation,
+and it may report the lack of a violation or matching code.
+When you then remove the `# noqa` comment or violation code,
+the other plugin will resume sending the violation,
+prompting you to restore the `# noqa` comment or code.
+The best fix for this situation is to try to get the offending plugin
+to stop respecting `# noqa` comments.
+A plugin doing so is considered an anti-pattern,
+and it's best to allow flake8 to determine if violations should be
+surfaced to the user or not.
+The offending plugin may have an option to control this behavior
+(note the flake8 `--disable-noqa` option will disable *all* noqa comments,
+so is not a suitable fix for this situation).
+If the plugin does not have an option to control its `# noqa` behavior,
+the best course of action may be to contact the maintainers of
+the plugin via the appropriate issue reporting system.
+If the plugin is unmaintained,
+or the maintainers decline to address the issue for whatever reason,
+feel free to file an issue on this plugin
+to see if a work-around can be established.
+
+%prep
+%autosetup -n flake8-noqa-1.3.1
+
+%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-noqa -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.3.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..adcbd09
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+529e2478ec1defaa0ba23e35de7f6b67 flake8-noqa-1.3.1.tar.gz