Skip to content

Commit

Permalink
flakes (flake8 3.0b2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Jun 30, 2016
1 parent 335e2e1 commit e9f1861
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ configcheck:

flakecheck:
# the only way to enable all-1 errors is to ignore one of them.
$(FLAKE8) --ignore=W503 "$(PROJ)"
$(FLAKE8) --ignore=X999 "$(PROJ)"

flakediag:
-$(MAKE) flakecheck
Expand Down
18 changes: 11 additions & 7 deletions celery/apps/beat.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,15 @@ def setup_logging(self, colorize=None):
colorize=colorize)

def start_scheduler(self):
c = self.colored
if self.pidfile:
platforms.create_pidlock(self.pidfile)
beat = self.Service(app=self.app,
max_interval=self.max_interval,
scheduler_cls=self.scheduler_cls,
schedule_filename=self.schedule)

print(text_t( # noqa (pyflakes chokes on print)
c.blue('__ ', c.magenta('-'),
c.blue(' ... __ '), c.magenta('-'),
c.blue(' _\n'),
c.reset(self.startup_info(beat))),
))
print(self.banner())

self.setup_logging()
if self.socket_timeout:
logger.debug('Setting default socket timeout to %r',
Expand All @@ -118,6 +113,15 @@ def start_scheduler(self):
exc_info=True)
raise

def banner(self):
c = self.colored
return text_t( # flake8: noqa
c.blue('__ ', c.magenta('-'),
c.blue(' ... __ '), c.magenta('-'),
c.blue(' _\n'),
c.reset(self.startup_info(beat))),
)

def init_loader(self):
# Run the worker init handler.
# (Usually imports task modules and such.)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ commands =

[testenv:flake8]
commands =
flake8 --exclude=W503 {toxinidir}/celery
flake8 --exclude=X999 {toxinidir}/celery

[testenv:flakeplus]
commands =
Expand Down

0 comments on commit e9f1861

Please sign in to comment.