Skip to content

Commit

Permalink
Some flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWilhelm committed Jul 2, 2019
1 parent 5345480 commit 3cc175d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Besides the typical [PyScaffold] layout, the extensions provides:
* `references` for data dictionaries, manuals, and all other explanatory materials.
* `reports` for generated analysis as HTML, PDF, LaTeX, etc. and a `figures` subdirectory
for generated graphics and figures to be used in reporting,
* `environment.yaml` to create an [conda][Miniconda] environment with the most
needed data science libraries and tools,
* `environment.yaml` to create an [conda][Miniconda] environment with the most
needed data science libraries and tools,

Check out the initial project structure under [dsproject-demo].

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
Learn more under: https://pyscaffold.org/
"""
import sys

from pkg_resources import require, VersionConflict
from pkg_resources import VersionConflict, require
from setuptools import setup

try:
Expand Down
2 changes: 1 addition & 1 deletion src/pyscaffoldext/dsproject/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from pkg_resources import get_distribution, DistributionNotFound
from pkg_resources import DistributionNotFound, get_distribution

try:
# Change here if project is renamed and does not equal the package name
Expand Down
5 changes: 3 additions & 2 deletions src/pyscaffoldext/dsproject/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pyscaffold.api import Extension, helpers
from pyscaffold.extensions.no_skeleton import NoSkeleton
from pyscaffold.extensions.pre_commit import PreCommit

from pyscaffoldext.markdown.extension import MarkDown

from . import templates
Expand Down Expand Up @@ -97,12 +98,12 @@ def add_dsproject(struct, opts):

path = [opts["project"], "references", ".gitignore"]
struct = helpers.ensure(struct, path,
"\n",
"",
helpers.NO_OVERWRITE)

path = [opts["project"], "reports", "figures", ".gitignore"]
struct = helpers.ensure(struct, path,
"\n",
"",
helpers.NO_OVERWRITE)

path = [opts["project"], "environment.yaml"]
Expand Down
1 change: 0 additions & 1 deletion src/pyscaffoldext/dsproject/templates/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import string

from pkg_resources import resource_string


Expand Down
5 changes: 2 additions & 3 deletions src/pyscaffoldext/dsproject/templates/train_model_py.template
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import logging
import sys

import click
from IPython.core import ultratb

import ${package}

# fallback to debugger on error
from IPython.core import ultratb
sys.excepthook = ultratb.FormattedTB(mode='Verbose', color_scheme='Linux', call_pdb=1)


_logger = logging.getLogger(__name__)


Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
Read more about conftest.py under:
https://pytest.org/latest/plugins.html
"""
from __future__ import print_function, absolute_import, division
from __future__ import absolute_import, division, print_function

import os
import stat
import shlex
import stat
from shutil import rmtree

import pytest
Expand Down

0 comments on commit 3cc175d

Please sign in to comment.