flake8-assertive 2.2.0__tar.gz → 2.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0}/CHANGELOG.rst +7 -0
  2. {flake8_assertive-2.2.0/flake8_assertive.egg-info → flake8_assertive-2.3.0}/PKG-INFO +14 -80
  3. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0}/README.rst +1 -1
  4. flake8_assertive-2.3.0/pyproject.toml +53 -0
  5. flake8_assertive-2.3.0/setup.cfg +9 -0
  6. flake8_assertive-2.3.0/setup.py +9 -0
  7. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0/src/flake8_assertive.egg-info}/PKG-INFO +14 -80
  8. flake8_assertive-2.3.0/src/flake8_assertive.egg-info/SOURCES.txt +15 -0
  9. flake8_assertive-2.3.0/src/flake8_assertive.egg-info/requires.txt +1 -0
  10. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0/src}/flake8_assertive.py +5 -11
  11. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0}/tests/test_checker.py +1 -1
  12. flake8_assertive-2.2.0/flake8_assertive.egg-info/SOURCES.txt +0 -15
  13. flake8_assertive-2.2.0/flake8_assertive.egg-info/requires.txt +0 -1
  14. flake8_assertive-2.2.0/flake8_assertive.egg-info/zip-safe +0 -1
  15. flake8_assertive-2.2.0/setup.cfg +0 -49
  16. flake8_assertive-2.2.0/setup.py +0 -10
  17. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0}/LICENSE +0 -0
  18. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0}/MANIFEST.in +0 -0
  19. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0/src}/flake8_assertive.egg-info/dependency_links.txt +0 -0
  20. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0/src}/flake8_assertive.egg-info/entry_points.txt +0 -0
  21. {flake8_assertive-2.2.0 → flake8_assertive-2.3.0/src}/flake8_assertive.egg-info/top_level.txt +0 -0
@@ -2,6 +2,13 @@
2
2
  Changes
3
3
  =======
4
4
 
5
+ 2.3.0 (2026-10-14)
6
+ ------------------
7
+
8
+ * Add support for Python 3.15.
9
+ * Drop support for Python 3.10. Python 3.11+ is now required.
10
+ * Drop support for flake8 versions older than 6.0.
11
+
5
12
  2.2.0 (2025-10-11)
6
13
  ------------------
7
14
 
@@ -1,35 +1,35 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flake8-assertive
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: Flake8 unittest assert method checker
5
- Home-page: https://github.com/jparise/flake8-assertive
6
- Author: Jon Parise
7
- Author-email: jon@indelible.org
8
- License: MIT
9
- Project-URL: Source Code, https://github.com/jparise/flake8-assertive
10
- Project-URL: Issue Tracker, https://github.com/jparise/flake8-assertive/issues
11
- Keywords: flake8 testing unittest assert
5
+ Author-email: Jon Parise <jon@indelible.org>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/jparise/flake8-assertive
8
+ Project-URL: Repository, https://github.com/jparise/flake8-assertive
9
+ Project-URL: Issues, https://github.com/jparise/flake8-assertive/issues
10
+ Project-URL: Changelog, https://github.com/jparise/flake8-assertive/blob/main/CHANGELOG.rst
11
+ Keywords: flake8,testing,unittest,assert
12
12
  Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Environment :: Console
14
14
  Classifier: Framework :: Flake8
15
15
  Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: MIT License
17
16
  Classifier: Programming Language :: Python
18
17
  Classifier: Programming Language :: Python :: 3 :: Only
19
- Classifier: Programming Language :: Python :: 3.10
20
18
  Classifier: Programming Language :: Python :: 3.11
21
19
  Classifier: Programming Language :: Python :: 3.12
22
20
  Classifier: Programming Language :: Python :: 3.13
23
21
  Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: 3.15
24
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
24
  Classifier: Topic :: Software Development :: Quality Assurance
26
25
  Classifier: Topic :: Software Development :: Testing
27
26
  Classifier: Topic :: Software Development :: Testing :: Unit
28
- Requires-Python: >=3.10
27
+ Requires-Python: >=3.11
28
+ Description-Content-Type: text/x-rst
29
29
  License-File: LICENSE
30
- Requires-Dist: flake8>=3.0.0
30
+ Requires-Dist: flake8>=6.0.0
31
31
  Dynamic: license-file
32
- Dynamic: requires-dist
32
+ Dynamic: requires-python
33
33
 
34
34
  =================================
35
35
  Flake8 Unittest Assertion Checker
@@ -138,7 +138,7 @@ that it has been loaded by inspecting the ``flake8 --version`` string.
138
138
  .. code-block:: sh
139
139
 
140
140
  $ flake8 --version
141
- 4.0.1 (assertive: 2.1.0, ...) CPython 3.9.10 on Darwin
141
+ 7.3.0 (assertive: 2.3.0, ...) CPython 3.11.10 on Darwin
142
142
 
143
143
 
144
144
  Error Codes
@@ -208,69 +208,3 @@ Alternatives
208
208
  :target: https://pypi.python.org/pypi/flake8-assertive
209
209
  .. |Python Versions| image:: https://img.shields.io/pypi/pyversions/flake8-assertive.svg
210
210
  :target: https://pypi.python.org/pypi/flake8-assertive
211
-
212
- =======
213
- Changes
214
- =======
215
-
216
- 2.2.0 (2025-10-11)
217
- ------------------
218
-
219
- * Drop support for Python 3.7, 3.8, and 3.9. Python 3.10+ is now required.
220
-
221
- 2.1.0 (2022-03-15)
222
- ------------------
223
-
224
- * Suggest using an explicit `msg` keyword argument with ``assertTrue()`` and
225
- ``assertFalse()`` to avoid accidental two-argument misuse. This is controlled
226
- by a new error code: ``A504``
227
-
228
- 2.0.0 (2021-12-30)
229
- ------------------
230
-
231
- * Drop support for Python 2.7 and 3.6, and add 3.10.
232
- * Drop support for flake8 2.x versions.
233
-
234
- 1.3.0 (2020-10-12)
235
- ------------------
236
-
237
- * Drop Python version 3.5 support and add version 3.9.
238
-
239
- 1.2.1 (2019-12-08)
240
- ------------------
241
-
242
- * Support keyword arguments in assert method calls.
243
-
244
- 1.2.0 (2019-12-05)
245
- ------------------
246
-
247
- * Suggest the preferred names for deprecated methods, such as
248
- ``assertEqual()`` instead of ``assertEquals()``.
249
-
250
- 1.1.0 (2019-06-26)
251
- ------------------
252
-
253
- * Suggest ``assertAlmostEqual(a, b, x)`` for ``round()`` expressions like in
254
- ``assertEqual(a, round(b, x))`` and ``assertAlmostEqual(a, round(b, x))``
255
- (and similar for ``assertNotEqual()`` and ``assertNotAlmostEqual()``.
256
- * Recognize ``assertAmostEquals()`` and ``assertNotAlmostEquals()`` as aliases
257
- for ``assertAlmostEqual()`` and ``assertNotAlmostEqual()``.
258
- * Drop Python 3.4 as a supported version since it has been officially retired.
259
-
260
- 1.0.1 (2018-07-03)
261
- ------------------
262
-
263
- * Don't make suggestions for assertions containing multiple comparison
264
- operations (e.g. ``assertTrue(a == b == c)``).
265
-
266
- 1.0.0 (2018-06-04)
267
- ------------------
268
-
269
- * Suggest ``assertIsNone(a)`` for ``assertTrue(a is None)``, etc.
270
- * Recognize ``assertEquals()`` and ``assertNotEquals()`` as aliases for
271
- ``assertEqual()`` and ``assertNotEqual()``.
272
-
273
- 0.9.0 (2018-05-14)
274
- ------------------
275
-
276
- * Initial beta release
@@ -105,7 +105,7 @@ that it has been loaded by inspecting the ``flake8 --version`` string.
105
105
  .. code-block:: sh
106
106
 
107
107
  $ flake8 --version
108
- 4.0.1 (assertive: 2.1.0, ...) CPython 3.9.10 on Darwin
108
+ 7.3.0 (assertive: 2.3.0, ...) CPython 3.11.10 on Darwin
109
109
 
110
110
 
111
111
  Error Codes
@@ -0,0 +1,53 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "flake8-assertive"
7
+ dynamic = ["version"]
8
+ description = "Flake8 unittest assert method checker"
9
+ authors = [
10
+ {name = "Jon Parise", email = "jon@indelible.org"},
11
+ ]
12
+ readme = "README.rst"
13
+ license = "MIT"
14
+ keywords = ["flake8", "testing", "unittest", "assert"]
15
+ classifiers = [
16
+ "Development Status :: 5 - Production/Stable",
17
+ "Environment :: Console",
18
+ "Framework :: Flake8",
19
+ "Intended Audience :: Developers",
20
+ "Programming Language :: Python",
21
+ "Programming Language :: Python :: 3 :: Only",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Programming Language :: Python :: 3.14",
26
+ "Programming Language :: Python :: 3.15",
27
+ "Topic :: Software Development :: Libraries :: Python Modules",
28
+ "Topic :: Software Development :: Quality Assurance",
29
+ "Topic :: Software Development :: Testing",
30
+ "Topic :: Software Development :: Testing :: Unit",
31
+ ]
32
+ requires-python = ">= 3.11"
33
+ dependencies = [
34
+ "flake8>=6.0.0",
35
+ ]
36
+
37
+ [dependency-groups]
38
+ dev = [
39
+ "pytest>=8",
40
+ "ruff==0.17.0",
41
+ ]
42
+
43
+ [project.entry-points."flake8.extension"]
44
+ A50 = "flake8_assertive:Checker"
45
+
46
+ [project.urls]
47
+ Homepage = "https://github.com/jparise/flake8-assertive"
48
+ Repository = "https://github.com/jparise/flake8-assertive"
49
+ Issues = "https://github.com/jparise/flake8-assertive/issues"
50
+ Changelog = "https://github.com/jparise/flake8-assertive/blob/main/CHANGELOG.rst"
51
+
52
+ [tool.setuptools.dynamic]
53
+ version = {attr = "flake8_assertive.__version__"}
@@ -0,0 +1,9 @@
1
+ [flake8]
2
+ exclude = .eggs/,.git/,.venv/,build/,dist/
3
+ extend-ignore = E203
4
+ max-line-length = 88
5
+
6
+ [egg_info]
7
+ tag_build =
8
+ tag_date = 0
9
+
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env python
2
+
3
+ from setuptools import setup
4
+
5
+ setup(
6
+ name="flake8-assertive",
7
+ install_requires=["flake8>=6.0.0"],
8
+ python_requires=">=3.11",
9
+ )
@@ -1,35 +1,35 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flake8-assertive
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: Flake8 unittest assert method checker
5
- Home-page: https://github.com/jparise/flake8-assertive
6
- Author: Jon Parise
7
- Author-email: jon@indelible.org
8
- License: MIT
9
- Project-URL: Source Code, https://github.com/jparise/flake8-assertive
10
- Project-URL: Issue Tracker, https://github.com/jparise/flake8-assertive/issues
11
- Keywords: flake8 testing unittest assert
5
+ Author-email: Jon Parise <jon@indelible.org>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/jparise/flake8-assertive
8
+ Project-URL: Repository, https://github.com/jparise/flake8-assertive
9
+ Project-URL: Issues, https://github.com/jparise/flake8-assertive/issues
10
+ Project-URL: Changelog, https://github.com/jparise/flake8-assertive/blob/main/CHANGELOG.rst
11
+ Keywords: flake8,testing,unittest,assert
12
12
  Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Environment :: Console
14
14
  Classifier: Framework :: Flake8
15
15
  Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: MIT License
17
16
  Classifier: Programming Language :: Python
18
17
  Classifier: Programming Language :: Python :: 3 :: Only
19
- Classifier: Programming Language :: Python :: 3.10
20
18
  Classifier: Programming Language :: Python :: 3.11
21
19
  Classifier: Programming Language :: Python :: 3.12
22
20
  Classifier: Programming Language :: Python :: 3.13
23
21
  Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: 3.15
24
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
24
  Classifier: Topic :: Software Development :: Quality Assurance
26
25
  Classifier: Topic :: Software Development :: Testing
27
26
  Classifier: Topic :: Software Development :: Testing :: Unit
28
- Requires-Python: >=3.10
27
+ Requires-Python: >=3.11
28
+ Description-Content-Type: text/x-rst
29
29
  License-File: LICENSE
30
- Requires-Dist: flake8>=3.0.0
30
+ Requires-Dist: flake8>=6.0.0
31
31
  Dynamic: license-file
32
- Dynamic: requires-dist
32
+ Dynamic: requires-python
33
33
 
34
34
  =================================
35
35
  Flake8 Unittest Assertion Checker
@@ -138,7 +138,7 @@ that it has been loaded by inspecting the ``flake8 --version`` string.
138
138
  .. code-block:: sh
139
139
 
140
140
  $ flake8 --version
141
- 4.0.1 (assertive: 2.1.0, ...) CPython 3.9.10 on Darwin
141
+ 7.3.0 (assertive: 2.3.0, ...) CPython 3.11.10 on Darwin
142
142
 
143
143
 
144
144
  Error Codes
@@ -208,69 +208,3 @@ Alternatives
208
208
  :target: https://pypi.python.org/pypi/flake8-assertive
209
209
  .. |Python Versions| image:: https://img.shields.io/pypi/pyversions/flake8-assertive.svg
210
210
  :target: https://pypi.python.org/pypi/flake8-assertive
211
-
212
- =======
213
- Changes
214
- =======
215
-
216
- 2.2.0 (2025-10-11)
217
- ------------------
218
-
219
- * Drop support for Python 3.7, 3.8, and 3.9. Python 3.10+ is now required.
220
-
221
- 2.1.0 (2022-03-15)
222
- ------------------
223
-
224
- * Suggest using an explicit `msg` keyword argument with ``assertTrue()`` and
225
- ``assertFalse()`` to avoid accidental two-argument misuse. This is controlled
226
- by a new error code: ``A504``
227
-
228
- 2.0.0 (2021-12-30)
229
- ------------------
230
-
231
- * Drop support for Python 2.7 and 3.6, and add 3.10.
232
- * Drop support for flake8 2.x versions.
233
-
234
- 1.3.0 (2020-10-12)
235
- ------------------
236
-
237
- * Drop Python version 3.5 support and add version 3.9.
238
-
239
- 1.2.1 (2019-12-08)
240
- ------------------
241
-
242
- * Support keyword arguments in assert method calls.
243
-
244
- 1.2.0 (2019-12-05)
245
- ------------------
246
-
247
- * Suggest the preferred names for deprecated methods, such as
248
- ``assertEqual()`` instead of ``assertEquals()``.
249
-
250
- 1.1.0 (2019-06-26)
251
- ------------------
252
-
253
- * Suggest ``assertAlmostEqual(a, b, x)`` for ``round()`` expressions like in
254
- ``assertEqual(a, round(b, x))`` and ``assertAlmostEqual(a, round(b, x))``
255
- (and similar for ``assertNotEqual()`` and ``assertNotAlmostEqual()``.
256
- * Recognize ``assertAmostEquals()`` and ``assertNotAlmostEquals()`` as aliases
257
- for ``assertAlmostEqual()`` and ``assertNotAlmostEqual()``.
258
- * Drop Python 3.4 as a supported version since it has been officially retired.
259
-
260
- 1.0.1 (2018-07-03)
261
- ------------------
262
-
263
- * Don't make suggestions for assertions containing multiple comparison
264
- operations (e.g. ``assertTrue(a == b == c)``).
265
-
266
- 1.0.0 (2018-06-04)
267
- ------------------
268
-
269
- * Suggest ``assertIsNone(a)`` for ``assertTrue(a is None)``, etc.
270
- * Recognize ``assertEquals()`` and ``assertNotEquals()`` as aliases for
271
- ``assertEqual()`` and ``assertNotEqual()``.
272
-
273
- 0.9.0 (2018-05-14)
274
- ------------------
275
-
276
- * Initial beta release
@@ -0,0 +1,15 @@
1
+ CHANGELOG.rst
2
+ LICENSE
3
+ MANIFEST.in
4
+ README.rst
5
+ pyproject.toml
6
+ setup.cfg
7
+ setup.py
8
+ src/flake8_assertive.py
9
+ src/flake8_assertive.egg-info/PKG-INFO
10
+ src/flake8_assertive.egg-info/SOURCES.txt
11
+ src/flake8_assertive.egg-info/dependency_links.txt
12
+ src/flake8_assertive.egg-info/entry_points.txt
13
+ src/flake8_assertive.egg-info/requires.txt
14
+ src/flake8_assertive.egg-info/top_level.txt
15
+ tests/test_checker.py
@@ -25,14 +25,11 @@ import fnmatch
25
25
  import re
26
26
 
27
27
  __all__ = ["Checker"]
28
- __version__ = "2.2.0"
29
-
30
-
31
- Constant = ast.Constant if hasattr(ast, "Constant") else ast.NameConstant
28
+ __version__ = "2.3.0"
32
29
 
33
30
 
34
31
  def is_constant(node, obj):
35
- return isinstance(node, Constant) and node.value is obj
32
+ return isinstance(node, ast.Constant) and node.value is obj
36
33
 
37
34
 
38
35
  def is_function_call(node, name):
@@ -67,10 +64,8 @@ def wrap_deprecated(func, name):
67
64
  """
68
65
 
69
66
  def wrapper(self, node):
70
- for error in func(self, node):
71
- yield error
72
- else:
73
- yield self.error(node, "A503", func=name, name=node.func.attr)
67
+ yield from func(self, node)
68
+ yield self.error(node, "A503", func=name, name=node.func.attr)
74
69
 
75
70
  return wrapper
76
71
 
@@ -131,8 +126,7 @@ class Checker:
131
126
  name = node.func.attr.lower().replace("_", "")
132
127
  func = getattr(self, "check_" + name, None)
133
128
  if func is not None:
134
- for error in func(node):
135
- yield error
129
+ yield from func(node)
136
130
 
137
131
  def check_assertequal(self, node):
138
132
  if any(arg for arg in args(node) if is_constant(arg, None)):
@@ -18,7 +18,7 @@ class TestChecks(unittest.TestCase):
18
18
  if expected is None:
19
19
  return self.assertIsNone(error)
20
20
 
21
- self.assertIsNotNone(error, "expected {0} error".format(expected))
21
+ self.assertIsNotNone(error, f"expected {expected} error")
22
22
  self.assertEqual(expected, error[2].split(" ")[0])
23
23
  if pattern is not None:
24
24
  self.assertRegex(error[2], re.escape(pattern))
@@ -1,15 +0,0 @@
1
- CHANGELOG.rst
2
- LICENSE
3
- MANIFEST.in
4
- README.rst
5
- flake8_assertive.py
6
- setup.cfg
7
- setup.py
8
- flake8_assertive.egg-info/PKG-INFO
9
- flake8_assertive.egg-info/SOURCES.txt
10
- flake8_assertive.egg-info/dependency_links.txt
11
- flake8_assertive.egg-info/entry_points.txt
12
- flake8_assertive.egg-info/requires.txt
13
- flake8_assertive.egg-info/top_level.txt
14
- flake8_assertive.egg-info/zip-safe
15
- tests/test_checker.py
@@ -1 +0,0 @@
1
- flake8>=3.0.0
@@ -1,49 +0,0 @@
1
- [metadata]
2
- name = flake8-assertive
3
- version = attr: flake8_assertive.__version__
4
- author = Jon Parise
5
- author_email = jon@indelible.org
6
- description = Flake8 unittest assert method checker
7
- long_description = file: README.rst, CHANGELOG.rst
8
- license = MIT
9
- url = https://github.com/jparise/flake8-assertive
10
- project_urls =
11
- Source Code = https://github.com/jparise/flake8-assertive
12
- Issue Tracker = https://github.com/jparise/flake8-assertive/issues
13
- keywords = flake8 testing unittest assert
14
- classifiers =
15
- Development Status :: 5 - Production/Stable
16
- Environment :: Console
17
- Framework :: Flake8
18
- Intended Audience :: Developers
19
- License :: OSI Approved :: MIT License
20
- Programming Language :: Python
21
- Programming Language :: Python :: 3 :: Only
22
- Programming Language :: Python :: 3.10
23
- Programming Language :: Python :: 3.11
24
- Programming Language :: Python :: 3.12
25
- Programming Language :: Python :: 3.13
26
- Programming Language :: Python :: 3.14
27
- Topic :: Software Development :: Libraries :: Python Modules
28
- Topic :: Software Development :: Quality Assurance
29
- Topic :: Software Development :: Testing
30
- Topic :: Software Development :: Testing :: Unit
31
-
32
- [options]
33
- py_modules = flake8_assertive
34
- python_requires = >= 3.10
35
- zip_safe = True
36
-
37
- [options.entry_points]
38
- flake8.extension =
39
- A50 = flake8_assertive:Checker
40
-
41
- [flake8]
42
- exclude = .eggs/,.git/,.venv/,build/,dist/
43
- extend-ignore = E203
44
- max-line-length = 88
45
-
46
- [egg_info]
47
- tag_build =
48
- tag_date = 0
49
-
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- from setuptools import setup
4
-
5
- setup(
6
- name="flake8-assertive",
7
- install_requires=["flake8>=3.0.0"],
8
- tests_require=["flake8>=3.0.0"],
9
- test_suite="tests",
10
- )