From 0541ad3bc1602fbd13a9d674631dad89ee5316ac Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 18 Apr 2015 17:32:13 +0300 Subject: Run pep8 in check; fix problems --- cachedir | 18 +++++++++--------- setup.py | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/cachedir b/cachedir index 85ede6f..5658e98 100755 --- a/cachedir +++ b/cachedir @@ -1,16 +1,16 @@ #!/usr/bin/python # Copyright 2012, 2013 Lars Wirzenius -# +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . @@ -33,11 +33,11 @@ class Cachedir(cliapp.Application): def cmd_tag(self, args): '''Add cache tag to directories.''' - + for dirname in args: with open(self._join(dirname), 'w') as f: f.write(self._tag) - + def cmd_untag(self, args): '''Remove cache tag from directories.''' @@ -46,10 +46,10 @@ class Cachedir(cliapp.Application): def cmd_iscache(self, args): '''Are all named directories tagged? - + There is no output, but exit code is 0 if all named directories are tagged as cache directories. - + ''' errors = False @@ -62,11 +62,11 @@ class Cachedir(cliapp.Application): def cmd_find(self, args): '''Find cache directories under the given directories.''' - + for startdir in args: for dirname, subdirs, filenames in os.walk(startdir): if os.path.exists(self._join(dirname)): self.output.write('%s\n' % dirname) - + Cachedir(version=__version__).run() diff --git a/setup.py b/setup.py index f675878..388df5e 100644 --- a/setup.py +++ b/setup.py @@ -60,7 +60,8 @@ class Check(Command): pass def run(self): - cliapp.runcmd(['cmdtest', 'tests']) + cliapp.runcmd(['cmdtest', 'tests'], stdout=None, stderr=None) + cliapp.runcmd(['pep8', 'cachedir'], stdout=None, stderr=None) setup(name='cachedir', -- cgit v1.2.1