diff options
| author | Scott Gasch <[email protected]> | 2022-02-08 13:08:52 -0800 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-02-08 13:08:52 -0800 |
| commit | 5c212d7639f62fcb936f9d7a0bbe704a9f7b213d (patch) | |
| tree | 7141828ab58490339e535d2873fe86d9f33d0c48 /acl.py | |
| parent | dfc2136113428b99719c49a57d3ce68391dcb307 (diff) | |
Hook in pylint to the pre-commit hook and start to fix some of its
warnings. It seems pickier than flake8 which is probably a good
thing.
Diffstat (limited to 'acl.py')
| -rw-r--r-- | acl.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,5 +1,7 @@ #!/usr/bin/env python3 +"""This module defines various flavors of Access Control Lists.""" + import enum import fnmatch import logging @@ -41,23 +43,23 @@ class SimpleACL(ABC): def __call__(self, x: Any) -> bool: """Returns True if x is allowed, False otherwise.""" - logger.debug(f'SimpleACL checking {x}') + logger.debug('SimpleACL checking %s', x) if self.order_to_check_allow_deny == Order.ALLOW_DENY: logger.debug('Checking allowed first...') if self.check_allowed(x): - logger.debug(f'{x} was allowed explicitly.') + logger.debug('%s was allowed explicitly.', x) return True logger.debug('Checking denied next...') if self.check_denied(x): - logger.debug(f'{x} was denied explicitly.') + logger.debug('%s was denied explicitly.', x) return False elif self.order_to_check_allow_deny == Order.DENY_ALLOW: logger.debug('Checking denied first...') if self.check_denied(x): - logger.debug(f'{x} was denied explicitly.') + logger.debug('%s was denied explicitly.', x) return False if self.check_allowed(x): - logger.debug(f'{x} was allowed explicitly.') + logger.debug('%s was allowed explicitly.', x) return True logger.debug( |
