dry-python / dry-python/lambdas

Convert all dunder functions to use the normal function signature

Offen
#4 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement good first issue hacktoberfest
Vorherrschende Sprache
Python
Sterne
286
Forks
6
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

When we define a class like this:
```python
def func():
...

class MyClass:
my_func = lambda self, arg: arg

# or
class MyAnotherClass:
my_func = func
```
The coverage plugin will consider the `my_func` as *coveraged* without any tests.
This behavior is expected because for it the `my_func` is an attribute!

I think it will be great use the normal signature, this will enforce we to make *dummy* tests to ensures the `_` will work correctly.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.