Commit 38646d0c authored by Jost Rossel's avatar Jost Rossel
Browse files

Migrate typing back to 3.8

parent c8fdec78
......@@ -7,7 +7,7 @@
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
"python.pythonPath": ".venv/bin/python3.9",
"python.pythonPath": ".venv/bin/python3.8",
"python.linting.pylintUseMinimalCheckers": false,
"cSpell.words": [
"PRNG",
......
......@@ -4,6 +4,7 @@ import io
import random
import re
from copy import deepcopy
from typing import List, Tuple
from lxml import etree
......@@ -17,7 +18,7 @@ class DestructiveMutator(Mutator):
def __init__(
self,
seed,
number_of_mutations_between: tuple[int, int] = None,
number_of_mutations_between: Tuple[int, int] = None,
number_of_mutations: int = None,
) -> None:
super().__init__(self.__class__, seed, number_of_mutations_between, number_of_mutations)
......@@ -69,7 +70,7 @@ class DestructiveMutator(Mutator):
func(self)
self.xml = "".join(self.elements)
def _to_list(self) -> list[str]:
def _to_list(self) -> List[str]:
"""
This method separates an xml in a "line by line" form.
This does not happen perfectly (e.g. with CDATA) but that doesn't really matter for fuzzing.
......
import random
from abc import ABC, abstractmethod
from inspect import getmembers, isfunction
from typing import Tuple
from ..utils import RandomCharacterGenerator
......@@ -12,7 +13,7 @@ class Mutator(ABC):
self,
cls,
seed,
number_of_mutations_between: tuple[int, int] = None,
number_of_mutations_between: Tuple[int, int] = None,
number_of_mutations: int = None,
) -> None:
"""Inits a mutator.
......
......@@ -26,6 +26,7 @@ import io
import random
import re
from copy import deepcopy
from typing import Tuple
from lxml import etree
......@@ -38,7 +39,7 @@ class NonDestructiveMutator(Mutator):
def __init__(
self,
seed,
number_of_mutations_between: tuple[int, int] = None,
number_of_mutations_between: Tuple[int, int] = None,
number_of_mutations: int = None,
) -> None:
super().__init__(self.__class__, seed, number_of_mutations_between, number_of_mutations)
......
"""Utility functions and classes"""
import random
import string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment