Skip to content

Commit fd5300d

Browse files
committed
chg: dev: release prep
1 parent 6203703 commit fd5300d

File tree

6 files changed

+27
-19
lines changed

6 files changed

+27
-19
lines changed

HISTORY.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ Release History
33

44
.. :changelog:
55
6+
v0.8.7 (2020-05-28)
7+
--------------------
8+
9+
Fix
10+
~~~
11+
- Consume asyncio main_task exceptions.
12+
613
v0.8.6 (2020-04-04)
714
--------------------
815

nicfit/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __parse_version(v): # pragma: nocover
1414
return ver, rel, ver_info
1515

1616

17-
__version__ = "0.8.6"
17+
__version__ = "0.8.7"
1818
__release_name__ = ""
1919
__years__ = "2016-2020"
2020

nicfit/__main__.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class Requirements(nicfit.Command):
3838
NAME = "requirements"
3939
ALIASES = ["reqs"]
4040

41-
def _splitPkg(self, line):
41+
@staticmethod
42+
def _splitPkg(line):
4243
pkg, ver = line, None
4344
for c in ("=", ">", "<"):
4445
i = line.find(c)
@@ -51,7 +52,7 @@ def _splitPkg(self, line):
5152
def _readReq(self, file):
5253
reqs = {}
5354
file.seek(0)
54-
for line in [l.strip() for l in file.readlines()
55+
for line in [l.strip() for l in file.readlines() # noqa E741
5556
if l.strip() and not l.startswith("#")]:
5657
pkg, version = self._splitPkg(line)
5758
reqs[pkg] = version
@@ -137,11 +138,12 @@ def _initArgParser(self, parser):
137138
help="Merge command. Called with with 2 args: "
138139
"<src> <dest>")
139140

140-
def _findTemplateDir(self):
141+
@staticmethod
142+
def _findTemplateDir():
141143
template_d = None
142144
for p in [Path(__file__).parent / "cookiecutter",
143145
Path(__file__).parent.parent / "cookiecutter",
144-
]:
146+
]:
145147
if p.exists():
146148
template_d = p
147149
break
@@ -214,7 +216,7 @@ def _gitCloneRepo(self, repo_path):
214216
def _merge(self, cc_dir):
215217
md5_hashes = {}
216218
if HASH_FILE.exists():
217-
for line in [l.strip() for l in HASH_FILE.read_text().split("\n")]:
219+
for line in [l.strip() for l in HASH_FILE.read_text().split("\n")]: # noqa E71
218220
if line:
219221
values = line.rsplit(":", maxsplit=1)
220222
if len(values) == 2 and values[0] and values[1]:

nicfit/aio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def _run(self, args_list=None):
2323
except asyncio.CancelledError as ex:
2424
self.log.debug("aio.Application: Cancelled: {}"
2525
.format(ex))
26-
except BaseException as base_ex:
26+
except BaseException:
2727
# This cleans up the _main_task and prevents"asyncio:Task exception was never retrieved"
2828
# e.g. SystemExit
2929
raise self._main_task.exception()

nicfit/logger.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def _initConsoleLogger(name, level, handler=None):
9292

9393

9494
def _optSplit(opt):
95-
if ':' in opt:
95+
if ":" in opt:
9696
first, second = opt.split(":", maxsplit=1)
9797
else:
9898
first, second = None, opt
@@ -132,12 +132,12 @@ def applyLoggingOpts(log_levels, log_files):
132132
applied again (e.g. when command line opts take precedence but were
133133
overridded by a fileConfig, etc.).
134134
"""
135-
for l, lvl in log_levels:
136-
l.setLevel(lvl)
137-
for l, hdl in log_files:
138-
for h in l.handlers:
139-
l.removeHandler(h)
140-
l.addHandler(hdl)
135+
for logger, lvl in log_levels:
136+
logger.setLevel(lvl)
137+
for logger, hdl in log_files:
138+
for h in logger.handlers:
139+
logger.removeHandler(h)
140+
logger.addHandler(hdl)
141141

142142

143143
class LogLevelAction(argparse._AppendAction):
@@ -164,7 +164,6 @@ def __call__(self, parser, namespace, values, option_string=None):
164164
logger, logpath = logging.getLogger(log_name), logpath
165165

166166
formatter = None
167-
handlers_logger = None
168167
if logger.hasHandlers():
169168
# Find the logger with the actual handlers attached
170169
handlers_logger = logger if logger.handlers else logger.parent

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ chardet==3.0.4 # via binaryornot, requests
1212
click==7.1.2 # via cookiecutter
1313
cookiecutter==1.7.2 # via -r requirements.txt
1414
deprecation==2.1.0 # via -r requirements.txt
15-
future==0.18.2 # via cookiecutter
1615
idna==2.9 # via requests
1716
jinja2-time==0.2.0 # via cookiecutter
1817
jinja2==2.11.2 # via cookiecutter, jinja2-time
19-
markupsafe==1.1.1 # via jinja2
18+
markupsafe==1.1.1 # via cookiecutter, jinja2
2019
packaging==20.4 # via deprecation
2120
poyo==0.5.0 # via cookiecutter
2221
prompt-toolkit==3.0.5 # via -r requirements.txt
2322
pygments==2.6.1 # via -r requirements.txt
2423
pyparsing==2.4.7 # via packaging
2524
python-dateutil==2.8.1 # via arrow
25+
python-slugify==4.0.0 # via cookiecutter
2626
pyyaml==5.3.1 # via -r requirements.txt
2727
requests==2.23.0 # via cookiecutter
28-
six==1.15.0 # via packaging, python-dateutil
28+
six==1.15.0 # via cookiecutter, packaging, python-dateutil
29+
text-unidecode==1.3 # via python-slugify
2930
urllib3==1.25.9 # via requests
3031
wcwidth==0.1.9 # via prompt-toolkit
31-
whichcraft==0.6.1 # via cookiecutter

0 commit comments

Comments
 (0)