• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

domdfcoding / attr_utils / 15207148476

23 May 2025 09:34AM UTC coverage: 95.64%. Remained the same
15207148476

push

github

domdfcoding
Update pytest warningsfilter.

351 of 367 relevant lines covered (95.64%)

0.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/attr_utils/utils.py
1
#!/usr/bin/env python
2
#
3
#  utils.py
4
"""
5
General utility functions.
6
"""
7
#
8
#  Copyright © 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
9
#
10
#  Permission is hereby granted, free of charge, to any person obtaining a copy
11
#  of this software and associated documentation files (the "Software"), to deal
12
#  in the Software without restriction, including without limitation the rights
13
#  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
#  copies of the Software, and to permit persons to whom the Software is
15
#  furnished to do so, subject to the following conditions:
16
#
17
#  The above copyright notice and this permission notice shall be included in all
18
#  copies or substantial portions of the Software.
19
#
20
#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
#  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
#  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23
#  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
24
#  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
25
#  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
26
#  OR OTHER DEALINGS IN THE SOFTWARE.
27
#
28

29
# stdlib
30
from typing import TYPE_CHECKING, Tuple
1✔
31

32
# 3rd party
33
from attrs import Attribute
1✔
34

35
__all__ = ["AttrsClass"]
1✔
36

37
if TYPE_CHECKING:
38
        # 3rd party
39
        from attrs import AttrsInstance as AttrsClass
40
else:
41
        # 3rd party
42
        from typing_extensions import Protocol, runtime_checkable
1✔
43

44
        @runtime_checkable
1✔
45
        class AttrsClass(Protocol):
1✔
46
                """
47
                :class:`~typing.Protocol` for attrs classes.
48
                """
49

50
                #: Special attribute used internally by attrs.
51
                __attrs_attrs__: Tuple[Attribute, ...]
1✔
52

53
                __name__: str
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc