Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix linting #14302

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion awx/main/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def check_license(self, add_host_name=None, feature=None, check_expiration=True,
report_violation = lambda message: logger.warning(message)
if validation_info.get('trial', False) is True or validation_info['instance_count'] == 10: # basic 10 license

def report_violation(message):
def report_violation(message): # noqa
raise PermissionDenied(message)

if check_expiration and validation_info.get('time_remaining', None) is None:
Expand Down
4 changes: 2 additions & 2 deletions awx/main/utils/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ def emit(self, record):
self.event_handler(dispatch_data)


ColorHandler = logging.StreamHandler

if settings.COLOR_LOGS is True:
try:
from logutils.colorize import ColorizingStreamHandler
Expand Down Expand Up @@ -133,3 +131,5 @@ def format(self, record):
except ImportError:
# logutils is only used for colored logs in the dev environment
pass
else:
ColorHandler = logging.StreamHandler
2 changes: 1 addition & 1 deletion awx/settings/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

# show colored logs in the dev environment
# to disable this, set `COLOR_LOGS = False` in awx/settings/local_settings.py
LOGGING['handlers']['console']['()'] = 'awx.main.utils.handlers.ColorHandler' # noqa
COLOR_LOGS = True
LOGGING['handlers']['console']['()'] = 'awx.main.utils.handlers.ColorHandler' # noqa

ALLOWED_HOSTS = ['*']

Expand Down
Loading