Skip to content

Commit

Permalink
PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed May 13, 2014
1 parent 86bc5e7 commit 10bf4a4
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions Makefile
@@ -1,5 +1,5 @@
#/***************************************************************************
# StreamFeatureTool
# StreamFeatureExtractor
#
# A tool to extract features from a stream network.
# -------------------
Expand Down Expand Up @@ -32,7 +32,7 @@ SOURCES = \
stream_feature_extractor_dialog.py\
utilities.py

PLUGINNAME = StreamFeatureTool
PLUGINNAME = StreamFeatureExtractor

PY_FILES = \
stream_feature_extractor.py \
Expand Down Expand Up @@ -192,7 +192,7 @@ pep8:
@echo "-----------"
@echo "PEP8 issues"
@echo "-----------"
@pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128 --exclude pydev,resources_rc.py . || true
@pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128 --exclude conf.py,pydev,resources_rc.py . || true

compile_ui:
@echo
Expand Down
6 changes: 4 additions & 2 deletions __init__.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""
/***************************************************************************
StreamFeatureTool
StreamFeatureExtractor
A QGIS plugin
A tool to extract features from a stream network.
-------------------
Expand All @@ -21,7 +21,9 @@
This script initializes the plugin, making it known to QGIS.
"""


# noinspection PyPep8Naming
def classFactory(iface):
# load StreamFeatureTool class from file StreamFeatureTool
"""load StreamFeatureExtractor class from file StreamFeatureExtractor."""
from stream_feature_extractor import StreamFeatureExtractor
return StreamFeatureExtractor(iface)
8 changes: 4 additions & 4 deletions help/source/conf.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# StreamFeatureTool documentation build configuration file, created by
# StreamFeatureExtractor documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 12 17:11:03 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
Expand Down Expand Up @@ -40,7 +40,7 @@
master_doc = 'index'

# General information about the project.
project = u'StreamFeatureTool'
project = u'StreamFeatureExtractor'
copyright = u'2013, Linfiniti Consulting CC.'

# The version info for the project you're documenting, acts as replacement for
Expand Down Expand Up @@ -178,7 +178,7 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'StreamFeatureTool.tex', u'StreamFeatureTool Documentation',
('index', 'StreamFeatureExtractor.tex', u'StreamFeatureExtractor Documentation',
u'Linfiniti Consulting CC.', 'manual'),
]

Expand Down Expand Up @@ -211,6 +211,6 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'TemplateClass', u'StreamFeatureTool Documentation',
('index', 'TemplateClass', u'StreamFeatureExtractor Documentation',
[u'Linfiniti Consulting CC.'], 1)
]
4 changes: 2 additions & 2 deletions help/source/index.rst
@@ -1,9 +1,9 @@
.. StreamFeatureTool documentation master file, created by
.. StreamFeatureExtractor documentation master file, created by
sphinx-quickstart on Sun Feb 12 17:11:03 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to StreamFeatureTool's documentation!
Welcome to StreamFeatureExtractor's documentation!
============================================

Contents:
Expand Down
2 changes: 1 addition & 1 deletion resources.qrc
@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/plugins/StreamFeatureTool" >
<qresource prefix="/plugins/StreamFeatureExtractor" >
<file>icon.svg</file>
</qresource>
</RCC>
9 changes: 4 additions & 5 deletions stream_feature_extractor.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""
/***************************************************************************
StreamFeatureTool
StreamFeatureExtractor
A QGIS plugin
A tool to extract features from a stream network.
-------------------
Expand Down Expand Up @@ -57,7 +57,7 @@ def __init__(self, iface):
locale_path = os.path.join(
self.plugin_dir,
'i18n',
'StreamFeatureTool_{}.qm'.format(locale))
'StreamFeatureExtractor_{}.qm'.format(locale))

if os.path.exists(locale_path):
self.translator = QTranslator()
Expand Down Expand Up @@ -175,21 +175,20 @@ def add_action(
def initGui(self):
"""Create the menu entries and toolbar icons inside the QGIS GUI."""
self.menu = u'Vector'
icon_path = ':/plugins/StreamFeatureTool/icon.svg'
icon_path = ':/plugins/StreamFeatureExtractor/icon.svg'
self.run_action = self.add_action(
icon_path,
text=self.tr(u"Extract from current layer",),
callback=self.run,
parent=self.iface.mainWindow())

# self.options_action = QAction(
# QIcon(":/plugins/StreamFeatureTool/icon.svg"),
# QIcon(":/plugins/StreamFeatureExtractor/icon.svg"),
# u"Options",
# self.iface.mainWindow())
# # connect the action to the run method
# self.run_action.triggered.connect(self.show_options)


if self.iface.activeLayer() is not None:
self.layer_changed(self.iface.activeLayer())

Expand Down
8 changes: 4 additions & 4 deletions test/test_utilities.py
Expand Up @@ -180,8 +180,10 @@ def setUpClass(cls):
cls.dgn_layer = get_temp_shapefile_layer(
DGN_SHP, 'dgn_test ')

cls.jawa_nodes_layer = get_temp_shapefile_layer(JAWA_NODES_SHP, 'nodes')
cls.dgn_nodes_layer = get_temp_shapefile_layer(DGN_NODES_SHP, 'nodes')
cls.jawa_nodes_layer = get_temp_shapefile_layer(
JAWA_NODES_SHP, 'nodes')
cls.dgn_nodes_layer = get_temp_shapefile_layer(
DGN_NODES_SHP, 'nodes')

cls.prepared_nodes_layer = get_temp_shapefile_layer(
JAWA_NODES_SHP, 'prepared_nodes')
Expand Down Expand Up @@ -630,5 +632,3 @@ def test_identify_features_dgn(self):

if __name__ == '__main__':
unittest.main()


1 change: 0 additions & 1 deletion utilities.py
Expand Up @@ -794,4 +794,3 @@ def is_line_layer(layer):
layer.geometryType() == QGis.Line)
except AttributeError:
return False

0 comments on commit 10bf4a4

Please sign in to comment.