Skip to content

Commit

Permalink
Flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Daphne Odekerken committed Dec 23, 2023
1 parent 14f4272 commit 65e1ee6
Show file tree
Hide file tree
Showing 178 changed files with 4,989 additions and 3,004 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def pairs(extension_set: Set) -> Set[FrozenSet]:
@staticmethod
def powerset(iterable) -> Set[FrozenSet]:
s = list(iterable)
list_of_tuples = set(itertools.chain.from_iterable(itertools.combinations(s, r) for r in range(len(s) + 1)))
list_of_tuples = set(itertools.chain.from_iterable(
itertools.combinations(s, r) for r in range(len(s) + 1)))

out = set()
for el in list_of_tuples:
Expand Down Expand Up @@ -110,4 +111,3 @@ def reduce(extension_set: Set) -> Set[FrozenSet]:
for ext in extension_set:
out.add(ext.difference(intersection))
return out

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as \
aux
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework \
import AbstractArgumentationFramework
from py_arg.abstract_argumentation.classes.defeat import Defeat


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from typing import Set, FrozenSet

import py_arg.abstract_argumentation.canonical_constructions.canonical_af.canonical_cf as canonical_cf
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.canonical_af \
.canonical_cf as canonical_cf
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework \
import AbstractArgumentationFramework
from py_arg.abstract_argumentation.classes.argument import Argument
from py_arg.abstract_argumentation.classes.defeat import Defeat

Expand All @@ -16,7 +18,8 @@ def defence_formula(extension_set: Set, arg: Argument) -> Set[FrozenSet]:


@staticmethod
def disjunctive_defence_formula(extension_set: Set, arg: Argument) -> Set[FrozenSet]:
def disjunctive_defence_formula(extension_set: Set, arg: Argument) -> \
Set[FrozenSet]:
cnf = defence_formula(extension_set, arg)
dnf = set({frozenset()})
for conjunct in cnf:
Expand Down Expand Up @@ -59,4 +62,5 @@ def apply(extension_set: Set) -> AbstractArgumentationFramework:
for c in disj:
atts_def.append(Defeat(c, new_arg))

return AbstractArgumentationFramework('', arguments=args_def, defeats=atts_def)
return AbstractArgumentationFramework('', arguments=args_def,
defeats=atts_def)
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.canonical_af.canonical_cf as canonical_cf
import py_arg.abstract_argumentation.semantics.get_stable_extensions as get_stable_extensions
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.canonical_af\
.canonical_cf as canonical_cf
import py_arg.abstract_argumentation.semantics.get_stable_extensions as \
get_stable_extensions
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework \
import AbstractArgumentationFramework
from py_arg.abstract_argumentation.classes.argument import Argument
from py_arg.abstract_argumentation.classes.defeat import Defeat

Expand All @@ -22,4 +25,5 @@ def apply(extension_set: Set) -> AbstractArgumentationFramework:
for arg in set(canon_cf.arguments).difference(el):
defeats.add(Defeat(arg, new_arg))

return AbstractArgumentationFramework('', arguments=list(arguments), defeats=list(defeats))
return AbstractArgumentationFramework('', arguments=list(arguments),
defeats=list(defeats))
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.canonical_af.canonical_def as canonical_def
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.check_conf_sens as check_conf_sens
import py_arg.abstract_argumentation.canonical_constructions.canonical_af\
.canonical_def as canonical_def
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework \
import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.check_conf_sens \
as check_conf_sens


@staticmethod
def apply(extension_set: Set) -> AbstractArgumentationFramework:
if check_conf_sens.apply(extension_set) and frozenset() in extension_set:
return canonical_def.apply(extension_set)
return AbstractArgumentationFramework('', arguments=[], defeats=[])


Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.canonical_af.canonical_cf as canonical_cf
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.check_downward_closed as check_downward_closed
import py_arg.abstract_argumentation.canonical_constructions.canonical_af\
.canonical_cf as canonical_cf
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework \
import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions\
.check_downward_closed as check_downward_closed
from py_arg.abstract_argumentation.canonical_constructions import check_tight


@staticmethod
def apply(extension_set: Set) -> AbstractArgumentationFramework:
if check_downward_closed.apply(extension_set) and check_tight.apply(extension_set):
if check_downward_closed.apply(extension_set) and check_tight.apply(
extension_set):
return canonical_cf.apply(extension_set)
return AbstractArgumentationFramework('', arguments=[], defeats=[])
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as \
aux
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework \
import AbstractArgumentationFramework


@staticmethod
def apply(extension_set: Set) -> AbstractArgumentationFramework:
if len(extension_set) == 1:
return AbstractArgumentationFramework('', arguments=list(aux.big_a(extension_set)), defeats=[])
return AbstractArgumentationFramework('', arguments=list(aux.big_a(
extension_set)), defeats=[])
return AbstractArgumentationFramework('', arguments=[], defeats=[])
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.canonical_af.canonical_cf as canonical_cf
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.check_dcl_tight as check_dcl_tight
import py_arg.abstract_argumentation.canonical_constructions.check_incomparable as check_incomparable
import py_arg.abstract_argumentation.canonical_constructions.check_non_empty as check_non_empty
import py_arg.abstract_argumentation.canonical_constructions.canonical_af\
.canonical_cf as canonical_cf
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework \
import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.check_dcl_tight \
as check_dcl_tight
import py_arg.abstract_argumentation.canonical_constructions\
.check_incomparable as check_incomparable
import py_arg.abstract_argumentation.canonical_constructions.check_non_empty \
as check_non_empty
from py_arg.abstract_argumentation.canonical_constructions import aux_operators


@staticmethod
def apply(extension_set: Set) -> AbstractArgumentationFramework:
if check_incomparable.apply(extension_set) and check_dcl_tight.apply(aux_operators.dcl(extension_set)) \
if check_incomparable.apply(extension_set) and check_dcl_tight.apply(
aux_operators.dcl(extension_set)) \
and check_non_empty.apply(extension_set):
return canonical_cf.apply(extension_set)
return AbstractArgumentationFramework('', arguments=[], defeats=[])
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.canonical_af.canonical_st as canonical_st
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.check_incomparable as check_incomparable
import py_arg.abstract_argumentation.canonical_constructions.canonical_af\
.canonical_st as canonical_st
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework \
import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions\
.check_incomparable as check_incomparable
from py_arg.abstract_argumentation.canonical_constructions import check_tight


@staticmethod
def apply(extension_set: Set) -> AbstractArgumentationFramework:
if check_incomparable.apply(extension_set) and check_tight.apply(extension_set) and len(extension_set) != 0:
if check_incomparable.apply(extension_set) and check_tight.apply(
extension_set) and len(extension_set) != 0:
return canonical_st.apply(extension_set)
return AbstractArgumentationFramework('', arguments=[], defeats=[])


Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.canonical_af.canonical_st as canonical_st
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions.check_incomparable as check_incomparable
import py_arg.abstract_argumentation.canonical_constructions.check_non_empty as check_non_empty
import py_arg.abstract_argumentation.canonical_constructions.canonical_af\
.canonical_st as canonical_st
from py_arg.abstract_argumentation.classes.abstract_argumentation_framework \
import AbstractArgumentationFramework
import py_arg.abstract_argumentation.canonical_constructions\
.check_incomparable as check_incomparable
import py_arg.abstract_argumentation.canonical_constructions.check_non_empty \
as check_non_empty
from py_arg.abstract_argumentation.classes.argument import Argument
from py_arg.abstract_argumentation.classes.defeat import Defeat
from py_arg.abstract_argumentation.canonical_constructions import check_tight
Expand All @@ -14,7 +18,9 @@
def apply(extension_set: Set) -> AbstractArgumentationFramework:
if not check_non_empty.apply(extension_set):
x = Argument('x')
return AbstractArgumentationFramework('', arguments=[x], defeats=[Defeat(x, x)])
if check_incomparable.apply(extension_set) and check_tight.apply(extension_set):
return AbstractArgumentationFramework('', arguments=[x],
defeats=[Defeat(x, x)])
if check_incomparable.apply(extension_set) and check_tight.apply(
extension_set):
return canonical_st.apply(extension_set)
return AbstractArgumentationFramework('', arguments=[], defeats=[])
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as \
aux


@staticmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as \
aux


@staticmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from typing import Set

from py_arg.abstract_argumentation.canonical_constructions import check_tight
from py_arg.abstract_argumentation.canonical_constructions import aux_operators as aux
from py_arg.abstract_argumentation.canonical_constructions import \
aux_operators as aux


@staticmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as \
aux


@staticmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as \
aux


@staticmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as \
aux


@staticmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from typing import Set


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as\
aux


@staticmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as \
aux


@staticmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

from typing import Set
from py_arg.abstract_argumentation.canonical_constructions import aux_operators as aux
from py_arg.abstract_argumentation.canonical_constructions import \
aux_operators as aux


@staticmethod
def apply(extension_set: Set) -> bool:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from typing import Set


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

from typing import Set

import py_arg.abstract_argumentation.canonical_constructions.aux_operators as aux
import py_arg.abstract_argumentation.canonical_constructions.aux_operators as \
aux


@staticmethod
Expand Down
Loading

0 comments on commit 65e1ee6

Please sign in to comment.