Commit Graph

5 Commits

Author SHA1 Message Date
Lumír 'Frenzy' Balhar f9ff9135b4
Fix test_ne in test_cmp.py for Python 3.13 (#1255)
* Fix test_ne in test_cmp.py for Python 3.13

Compiler in Python 3.13+ strips indents from docstrings
so they need to be compared without it for new Pythons.

Fixes: https://github.com/python-attrs/attrs/issues/1228

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-07 09:23:46 +00:00
Hynek Schlawack a5cbd51fd9
Tighten linting (#1175)
* Tighten linting

* Consistency

* Simplify config

* Simplify
2023-08-20 12:03:53 +02:00
Hynek Schlawack 980c8b04f5
Drop Python 2.7 (#936)
* Drop Python 2.7

The tooling situation around Python 2 has deteriorate to such a degree that
upholding compatibility is not tenable anymore for a volunteer-run project.

Signed-off-by: Hynek Schlawack <hs@ox.cx>

* Add newsfragment

* Run Python 3.5 under coverage to make up for Python 2.7

* Wait for py35 in parallel

* Remove fullmatch kludge

* Remove Python 2-specific code

* Revert empty slot test

Also disable pyupgrade on that file.

Signed-off-by: Hynek Schlawack <hs@ox.cx>

* We DO run under 3.5

* Remove __qualname__ workarounds

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update changelog.d/936.breaking.rst

Co-authored-by: Tin Tvrtković <tinchester@gmail.com>

* Compare methods using is

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
2022-03-21 08:47:47 +01:00
Hynek Schlawack 046beaaaaa Apply SPDX IDs 2021-12-27 09:29:09 +01:00
Antonio Botelho 71b4638b32
New attr.cmp_using helper function (#787)
* New attr.cmp_using helper function

* Updated cmp_using to use new_class instead of direct patching

* Removed stray annotation that make tests fail in PY2

* Skip test if PY2 because it won't raise TypeError when a method returns NotImplemented

* Skip test if PY2 because it won't raise TypeError when a method returns NotImplemented

* Fixed PY2 tests related to total_ordering

* Added tests to complete converage

* Moved class_name argument to definition and made it non-optional

* Fixed typo in variable name

* Revert accidental black formatting of __init__.pyi in commit 2b7970bf

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2021-05-01 14:21:37 +02:00