diff --git a/setools/diff/bounds.py b/setools/diff/bounds.py index 1994a93..b083584 100644 --- a/setools/diff/bounds.py +++ b/setools/diff/bounds.py @@ -99,8 +99,7 @@ class BoundsDifference(Difference): self._right_typebounds = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class BoundsWrapper(Wrapper[Bounds]): # pylint: disable=unsubscriptable-object +class BoundsWrapper(Wrapper[Bounds]): """Wrap *bounds for diff purposes.""" diff --git a/setools/diff/conditional.py b/setools/diff/conditional.py index aaf20e6..6cc745a 100644 --- a/setools/diff/conditional.py +++ b/setools/diff/conditional.py @@ -43,8 +43,7 @@ def conditional_wrapper_factory(cond: Conditional) -> "ConditionalWrapper": return a -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class ConditionalWrapper(Wrapper[Conditional]): # pylint: disable=unsubscriptable-object +class ConditionalWrapper(Wrapper[Conditional]): """Wrap conditional policy expressions to allow comparisons by truth table.""" diff --git a/setools/diff/constraints.py b/setools/diff/constraints.py index 29a825a..6a15b2a 100644 --- a/setools/diff/constraints.py +++ b/setools/diff/constraints.py @@ -174,8 +174,7 @@ class ConstraintsDifference(Difference): self._right_constraints = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class ConstraintWrapper(Wrapper[AnyConstraint]): # pylint: disable=unsubscriptable-object +class ConstraintWrapper(Wrapper[AnyConstraint]): """Wrap constraints for diff purposes.""" diff --git a/setools/diff/context.py b/setools/diff/context.py index 679ffda..da8011c 100644 --- a/setools/diff/context.py +++ b/setools/diff/context.py @@ -30,8 +30,7 @@ from .types import type_wrapper_factory from .users import user_wrapper_factory -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class ContextWrapper(Wrapper[Context]): # pylint: disable=unsubscriptable-object +class ContextWrapper(Wrapper[Context]): """Wrap contexts to allow comparisons.""" diff --git a/setools/diff/default.py b/setools/diff/default.py index 913132d..cab4150 100644 --- a/setools/diff/default.py +++ b/setools/diff/default.py @@ -98,8 +98,7 @@ class DefaultsDifference(Difference): self.modified_defaults = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class DefaultWrapper(Wrapper[Default]): # pylint: disable=unsubscriptable-object +class DefaultWrapper(Wrapper[Default]): """Wrap default_* to allow comparisons.""" diff --git a/setools/diff/difference.py b/setools/diff/difference.py index dc23e1a..78ccb18 100644 --- a/setools/diff/difference.py +++ b/setools/diff/difference.py @@ -169,8 +169,7 @@ class Wrapper(ABC, Generic[T]): S = TypeVar("S", bound=PolicySymbol) -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class SymbolWrapper(Wrapper[S]): # pylint: disable=unsubscriptable-object +class SymbolWrapper(Wrapper[S]): """ General wrapper for policy symbols, e.g. types, roles diff --git a/setools/diff/fsuse.py b/setools/diff/fsuse.py index 25f2ad6..69cb0df 100644 --- a/setools/diff/fsuse.py +++ b/setools/diff/fsuse.py @@ -74,8 +74,7 @@ class FSUsesDifference(Difference): self.modified_fs_uses = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class FSUseWrapper(Wrapper[FSUse]): # pylint: disable=unsubscriptable-object +class FSUseWrapper(Wrapper[FSUse]): """Wrap fs_use_* rules to allow set operations.""" diff --git a/setools/diff/genfscon.py b/setools/diff/genfscon.py index 9203133..80d41cb 100644 --- a/setools/diff/genfscon.py +++ b/setools/diff/genfscon.py @@ -74,8 +74,7 @@ class GenfsconsDifference(Difference): self.modified_genfscons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class GenfsconWrapper(Wrapper[Genfscon]): # pylint: disable=unsubscriptable-object +class GenfsconWrapper(Wrapper[Genfscon]): """Wrap genfscon rules to allow set operations.""" diff --git a/setools/diff/ibendportcon.py b/setools/diff/ibendportcon.py index e70a0ca..4ee4df8 100644 --- a/setools/diff/ibendportcon.py +++ b/setools/diff/ibendportcon.py @@ -73,8 +73,7 @@ class IbendportconsDifference(Difference): self.modified_ibendportcons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class IbendportconWrapper(Wrapper[Ibendportcon]): # pylint: disable=unsubscriptable-object +class IbendportconWrapper(Wrapper[Ibendportcon]): """Wrap ibendportcon statements for diff purposes.""" diff --git a/setools/diff/ibpkeycon.py b/setools/diff/ibpkeycon.py index 1974ef2..5c0a9e7 100644 --- a/setools/diff/ibpkeycon.py +++ b/setools/diff/ibpkeycon.py @@ -74,8 +74,7 @@ class IbpkeyconsDifference(Difference): self.modified_ibpkeycons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class IbpkeyconWrapper(Wrapper[Ibpkeycon]): # pylint: disable=unsubscriptable-object +class IbpkeyconWrapper(Wrapper[Ibpkeycon]): """Wrap ibpkeycon statements for diff purposes.""" diff --git a/setools/diff/mls.py b/setools/diff/mls.py index c846320..f022654 100644 --- a/setools/diff/mls.py +++ b/setools/diff/mls.py @@ -218,8 +218,7 @@ class LevelDeclsDifference(Difference): self.modified_levels = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class LevelDeclWrapper(Wrapper[LevelDecl]): # pylint: disable=unsubscriptable-object +class LevelDeclWrapper(Wrapper[LevelDecl]): """Wrap level declarations to allow comparisons.""" @@ -242,8 +241,7 @@ class LevelDeclWrapper(Wrapper[LevelDecl]): # pylint: disable=unsubscriptable-o return self.sensitivity < other.sensitivity -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class LevelWrapper(Wrapper[Level]): # pylint: disable=unsubscriptable-object +class LevelWrapper(Wrapper[Level]): """Wrap levels to allow comparisons.""" @@ -276,8 +274,7 @@ class LevelWrapper(Wrapper[Level]): # pylint: disable=unsubscriptable-object return False -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class RangeWrapper(Wrapper[Range]): # pylint: disable=unsubscriptable-object +class RangeWrapper(Wrapper[Range]): """ Wrap ranges to allow comparisons. diff --git a/setools/diff/mlsrules.py b/setools/diff/mlsrules.py index a8e72db..3ae7165 100644 --- a/setools/diff/mlsrules.py +++ b/setools/diff/mlsrules.py @@ -115,8 +115,7 @@ class MLSRulesDifference(Difference): self._right_mls_rules = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class MLSRuleWrapper(Wrapper[MLSRule]): # pylint: disable=unsubscriptable-object +class MLSRuleWrapper(Wrapper[MLSRule]): """Wrap MLS rules to allow set operations.""" diff --git a/setools/diff/netifcon.py b/setools/diff/netifcon.py index 29e813c..ab77073 100644 --- a/setools/diff/netifcon.py +++ b/setools/diff/netifcon.py @@ -89,8 +89,7 @@ class NetifconsDifference(Difference): self.modified_netifcons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class NetifconWrapper(Wrapper[Netifcon]): # pylint: disable=unsubscriptable-object +class NetifconWrapper(Wrapper[Netifcon]): """Wrap netifcon statements for diff purposes.""" diff --git a/setools/diff/nodecon.py b/setools/diff/nodecon.py index 70d2c37..c1242ee 100644 --- a/setools/diff/nodecon.py +++ b/setools/diff/nodecon.py @@ -74,8 +74,7 @@ class NodeconsDifference(Difference): self.modified_nodecons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class NodeconWrapper(Wrapper[Nodecon]): # pylint: disable=unsubscriptable-object +class NodeconWrapper(Wrapper[Nodecon]): """Wrap nodecon statements for diff purposes.""" diff --git a/setools/diff/portcon.py b/setools/diff/portcon.py index 26a0fc0..548b658 100644 --- a/setools/diff/portcon.py +++ b/setools/diff/portcon.py @@ -73,8 +73,7 @@ class PortconsDifference(Difference): self.modified_portcons = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class PortconWrapper(Wrapper[Portcon]): # pylint: disable=unsubscriptable-object +class PortconWrapper(Wrapper[Portcon]): """Wrap portcon statements for diff purposes.""" diff --git a/setools/diff/rbacrules.py b/setools/diff/rbacrules.py index 849e8a0..8a7ea95 100644 --- a/setools/diff/rbacrules.py +++ b/setools/diff/rbacrules.py @@ -137,8 +137,7 @@ class RBACRulesDifference(Difference): self._right_rbac_rules = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class RoleAllowWrapper(Wrapper[RoleAllow]): # pylint: disable=unsubscriptable-object +class RoleAllowWrapper(Wrapper[RoleAllow]): """Wrap role allow rules to allow set operations.""" @@ -162,8 +161,7 @@ class RoleAllowWrapper(Wrapper[RoleAllow]): # pylint: disable=unsubscriptable-o return self.source == other.source and self.target == other.target -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class RoleTransitionWrapper(Wrapper[RoleTransition]): # pylint: disable=unsubscriptable-object +class RoleTransitionWrapper(Wrapper[RoleTransition]): """Wrap role_transition rules to allow set operations.""" diff --git a/setools/diff/terules.py b/setools/diff/terules.py index 9299426..a46f99c 100644 --- a/setools/diff/terules.py +++ b/setools/diff/terules.py @@ -550,8 +550,7 @@ class TERulesDifference(Difference): self._right_te_rules = None -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class AVRuleXpermWrapper(Wrapper[AVRuleXperm]): # pylint: disable=unsubscriptable-object +class AVRuleXpermWrapper(Wrapper[AVRuleXperm]): """Wrap extended permission access vector rules to allow set operations.""" @@ -581,8 +580,7 @@ class AVRuleXpermWrapper(Wrapper[AVRuleXperm]): # pylint: disable=unsubscriptab self.xperm_type == other.xperm_type -# Pylint bug: https://github.com/PyCQA/pylint/issues/2822 -class TERuleWrapper(Wrapper): # pylint: disable=unsubscriptable-object +class TERuleWrapper(Wrapper): """Wrap type_* rules to allow set operations.""" diff --git a/tox.ini b/tox.ini index 0e152a3..81c059e 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,7 @@ commands = coverage run setup.py test -q [testenv:lint] deps = {[testenv]deps} - pylint + pylint>=2.8.0 commands_pre = pylint --version {envpython} setup.py build_ext -i commands = pylint -E --rcfile .pylintrc setools tests seinfo seinfoflow sedta sesearch sediff sechecker