f146728c1e
- update to 24.12.12: * B012 and B025 now also handle try/except* * Skip B028 if warnings.warn is called with `*args or **kwargs * Add B911: itertools.batched without strict= * Readme has anchors per check (they do not seem to render on GitHub tho) - update to 24.10.31: * B041: New dictionary same key AND value check * B037: Fix typo in error message * B024: No longer treats assigned class variables as abstract * Bump required attrs version to 22.2.0 - update to 24.8.19: * B910: implement to suggest using Counter() instead of defaultdict(int) * B901: Do not trigger with explicit Generator return type * B008: add some comments, rename b008_extend_immutable_calls * B040: exception with note added not reraised or used * B039, Add ContextVar` with mutable literal or function call as default * B040: Add Exception with added note not reraised. * Run tests in Python 3.13 * Type annotated code * Replace hash with unsafe_hash - update to 24.4.26: * B909: Fix false positive affecting containers of mutables - update to 24.4.21: * B950: Add pragma comment to line length ignores * B909: Add more cases to detect + more container mutating functions
Dirk Mueller2025-09-29 10:49:03 +00:00
3456b6780c
Accepting request 1280538 from devel:languages:python
Ana Guerrero2025-05-27 16:43:24 +00:00
7b034ba939
Accepting request 1280536 from home:mcalabkova:branches:devel:languages:python
Markéta Machová2025-05-27 12:00:53 +00:00
b407c4cf1f
Accepting request 1161533 from devel:languages:python
Ana Guerrero2024-03-26 18:26:14 +00:00
c7ba82415b
- update to 24.2.6: * B902: Remove decorators named validator and root_validator from B902 checks * B038: Change B038 to B909 and make it optional
Dirk Mueller2024-03-25 17:50:34 +00:00
9a6ef07ecc
Accepting request 1140112 from devel:languages:python
Ana Guerrero2024-01-21 22:09:01 +00:00
3b31935255
- update to 24.1.17: * B038: Restrict rule to mutation functions only - update to 24.1.16: * B036: Fix crash on `raise` statements raising something other than - update to 24.1.15: * B038: Add check for mutations of loop iterator * B037: Add check for yielding or returning values in __init__() * B017: make B017 also apply to BaseException * B036: Add check for except BaseException without re-raising
Dirk Mueller2024-01-20 13:07:44 +00:00
bbc93d233c
Accepting request 1130855 from devel:languages:python
Ana Guerrero2023-12-05 16:03:10 +00:00
73b9fcda42
- update to 23.12.2: * B018: to detect useless-statements at all levels (#434) * B018: Add classname to b018 useless-expression output (#433) * B018: Include tuples in b018 useless-statement check (#432) - update to 23.11.28: * B035: Fix false positive when named expressions are used (#430) - update to 23.11.26: * B035: add check for static keys in dict-comprehension (#426) * B902: Add exceptions for standard library metaclasses (#415) * B017: Modify to no longer have a false negative when raises() is imported directly from pytest (#424) * B026: Fix bug where the check was not triggered for calls where the caller is an attribute (#420) * Black all the .py files - Like one should (#48) * Fix pathlib link in readme (#36)
Dirk Mueller2023-12-04 21:34:04 +00:00
4a5948d749
- update to 23.9.16: * add --classmethod-decorators (#405) * fix name collision for node_stack on python 3.12 (#406) * Use pypa/build to build the package (#404)
Daniel Garcia2023-09-18 06:55:26 +00:00
e423aaaa66
- update to 23.7.10: * Add B034: re.sub/subn/split must pass flags/count/maxsplit as keyword arguments. * Fix a crash and several test failures on Python 3.12, all relating to the B907 * check. * Declare support for Python 3.12.
Dirk Mueller2023-07-11 14:10:58 +00:00
4a3261d6e3
- update to 23.5.9: * Add B033: Detect duplicate items in sets * Add B908: Detect assertRauses like contexts only has top level statements that could throw * Add B028: Allow stacklevel to be explicitly assigned as a positional argument * Remove more < 3.8 checks / assertions
Dirk Mueller2023-05-18 07:02:59 +00:00
46254ce9e2
- update to 23.2.13: * B906: Add visit_Bytes, visit_Num and visit_Str to the list of visit_* functions that are ignored by the B906 check. * B016: Warn when raising f-strings. * Add B028: Check for an explicit stacklevel keyword argument on the warn method from the warnings module. * Add B029: Check when trying to use `except with an empty tuple i.e. except: (). * Add B032: Check for possible unintentional type annotations instead of assignments. * B024: now ignores classes without any methods. (#336) * B017: Don't warn when pytest.raises() has a match argument. (#334) * B906: Ignore visit_ functions with a _fields attribute that can't contain ast.AST subnodes. (#330) * Rename B028 to B907, making it optional/opinionated. * Add B906: visit_ function with no further calls to a visit function. (#313) * Add B028: Suggest !r` when formatted value in f-string is surrounded by quotes. (#319)
Dirk Mueller2023-02-15 19:46:01 +00:00
54684cdb0f
- update to 22.12.6 (bsc#1206225): * Add B905: zip() without an explicit strict= parameter. (#314) * B027: ignore @overload when typing is imported with other names (#309)
Dirk Mueller2022-12-15 21:01:52 +00:00
57f4ffcf1b
- Update to 20.1.4: * Ignore keywords for B009/B010 * Silence B009/B010 for non-identifiers * State an ignore might be needed for optional B9x checks * Fix error on attributes-of-attributes in except (...): clauses * Allow continue/break within loops in finally clauses for B012 * For B001, also check for except (): * Introduce B013 and B014 to check tuples in except (..., ): statements * Warn about continue/return/break in finally block (#100) * Removed a colon from the descriptive message in B008. (#96)
Tomáš Chvátal
2020-04-16 11:16:35 +00:00
9a98cd1a26
Accepting request 730552 from devel:languages:python
Yuchen Lin2019-09-17 11:36:02 +00:00
eb7a19dc04
- Update to 19.8.0: * Fix .travis.yml syntax + add Python 3.8 + nightly tests * Fix black formatting + enforce via CI * Make B901 not apply to __await__ methods
Tomáš Chvátal
2019-09-13 07:41:59 +00:00
74ef1e4552
- Update to 19.3.0: * allow 'mcs' for metaclass classmethod first arg (PyCharm default) * Introduce B011 * Introduce B009 and B010 * Exclude immutable calls like tuple() and frozenset() from B008 * For B902, the first argument for metaclass class methods can be "mcs", matching the name preferred by PyCharm.
Tomáš Chvátal
2019-04-01 13:31:42 +00:00