Skip to content

Commit a3d840c

Browse files
committed
refactor: switch from use of ABCMeta to ABC
1 parent 0f56bbc commit a3d840c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/grizzly/adapter/adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
from __future__ import annotations
55

6-
from abc import ABCMeta, abstractmethod
6+
from abc import ABC, abstractmethod
77
from pathlib import Path
88
from typing import TYPE_CHECKING, Any, final
99

@@ -27,7 +27,7 @@ class AdapterError(Exception):
2727
"""The base class for exceptions raised by an Adapter"""
2828

2929

30-
class Adapter(metaclass=ABCMeta):
30+
class Adapter(ABC):
3131
"""An Adapter is the interface between Grizzly and a fuzzer. A subclass must
3232
be created in order to add support for additional fuzzers. The Adapter is
3333
responsible for handling input/output data and executing the fuzzer.

src/grizzly/common/reporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
from __future__ import annotations
55

6-
from abc import ABCMeta, abstractmethod
6+
from abc import ABC, abstractmethod
77
from enum import IntEnum, unique
88
from json import dumps, loads
99
from logging import getLogger
@@ -56,7 +56,7 @@ class Quality(IntEnum):
5656
NOT_REPRODUCIBLE = 10
5757

5858

59-
class Reporter(metaclass=ABCMeta):
59+
class Reporter(ABC):
6060
__slots__ = ("display_logs",)
6161

6262
def __init__(self) -> None:

src/grizzly/target/target.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
from __future__ import annotations
55

6-
from abc import ABCMeta, abstractmethod
6+
from abc import ABC, abstractmethod
77
from enum import IntEnum, unique
88
from logging import getLogger
99
from os import environ
@@ -54,7 +54,7 @@ class TargetLaunchTimeout(TargetError):
5454
"""Raised if the target does not launch within the defined amount of time"""
5555

5656

57-
class Target(metaclass=ABCMeta):
57+
class Target(ABC):
5858
SUPPORTED_ASSETS: tuple[str, ...] = ()
5959
TRACKED_ENVVARS: tuple[str, ...] = ()
6060

src/grizzly/target/target_monitor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
from __future__ import annotations
55

6-
from abc import ABCMeta, abstractmethod
6+
from abc import ABC, abstractmethod
77

88
__all__ = ("TargetMonitor",)
99
__author__ = "Tyson Smith"
1010
__credits__ = ["Tyson Smith", "Jesse Schwartzentruber"]
1111

1212

13-
class TargetMonitor(metaclass=ABCMeta):
13+
class TargetMonitor(ABC):
1414
@abstractmethod
1515
def is_healthy(self) -> bool:
1616
"""Check for failures such as assertions, crashes, etc.

0 commit comments

Comments
 (0)