Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45ee2e7

Browse files
authored
Move 'blurb export' to blurb._export (#57)
1 parent 6f7a138 commit 45ee2e7

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/blurb/_export.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import os
2+
import shutil
3+
4+
from blurb._cli import subcommand
5+
6+
7+
@subcommand
8+
def export() -> None:
9+
"""Removes blurb data files, for building release tarballs/installers."""
10+
os.chdir('Misc')
11+
shutil.rmtree('NEWS.d', ignore_errors=True)

src/blurb/blurb.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,10 @@
4545
import itertools
4646
import os
4747
import re
48-
import shutil
4948
import sys
5049
import textwrap
5150
import time
5251

53-
from blurb._cli import main, subcommand
54-
from blurb._git import git_add_files, flush_git_add_files
5552
from blurb._template import (
5653
next_filename_unsanitize_sections, sanitize_section,
5754
sanitize_section_legacy, sections, unsanitize_section,
@@ -474,14 +471,7 @@ def error(*a):
474471
sys.exit("Error: " + s)
475472

476473

477-
@subcommand
478-
def export():
479-
"""
480-
Removes blurb data files, for building release tarballs/installers.
481-
"""
482-
os.chdir("Misc")
483-
shutil.rmtree("NEWS.d", ignore_errors=True)
484-
485-
486474
if __name__ == '__main__':
475+
from blurb._cli import main
476+
487477
main()

0 commit comments

Comments
 (0)