Skip to content

Commit

Permalink
PEP-257 the clean_old_mashes script.
Browse files Browse the repository at this point in the history
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
  • Loading branch information
bowlofeggs committed Apr 7, 2017
1 parent ceaf533 commit 4c08c2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions bodhi/server/scripts/clean_old_mashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
This tool cleans up old mashes that are left over in mash_dir.
"""
"""This tool cleans up old mashes that are left over in mash_dir."""
import collections

import click
Expand All @@ -30,9 +28,7 @@
@click.command()
@click.version_option(message='%(version)s')
def clean_up():
"""
Delete any repo mashes that are older than the newest 10 from each repo series.
"""
"""Delete any repo mashes that are older than the newest 10 from each repo series."""
mash_dir = config.config['mash_dir']

# This data structure will map the beginning of a group of dirs for the same repo to a list of
Expand Down
4 changes: 2 additions & 2 deletions bodhi/tests/test_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def test_code_with_pydocstyle(self):
The goal is that this test would one day check the entire codebase.
"""
enforced_paths = [
'bodhi/server/scripts/approve_testing.py', 'bodhi/server/scripts/expire_overrides.py',
'bodhi/server/scripts/initializedb.py']
'bodhi/server/scripts/approve_testing.py', 'bodhi/server/scripts/clean_old_mashes.py',
'bodhi/server/scripts/expire_overrides.py', 'bodhi/server/scripts/initializedb.py']

enforced_paths = [os.path.join(REPO_PATH, p) for p in enforced_paths]
pydocstyle_command = ['pydocstyle']
Expand Down

0 comments on commit 4c08c2f

Please sign in to comment.