Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
rename flake8 into code_style
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Apr 14, 2018
1 parent 69992f7 commit c526050
Show file tree
Hide file tree
Showing 25 changed files with 36 additions and 39 deletions.
11 changes: 4 additions & 7 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
History
=======

current - 2018-03-31 - 0.00Mb
current - 2018-04-14 - 0.00Mb
=============================

1.2.731 - 2018-03-22 - 0.50Mb
=============================

1.2.729 - 2018-03-16 - 0.50Mb
=============================

* `18`: fix urls to download data (google, yahoo) (2018-03-16)

1.2.722 - 2018-03-11 - 0.50Mb
Expand All @@ -22,9 +19,6 @@ current - 2018-03-31 - 0.00Mb
1.2.717 - 2018-02-20 - 0.50Mb
=============================

1.2.710 - 2017-12-18 - 0.50Mb
=============================

* `16`: split *pyensae* into *pyenbc* for remote access to clusters
and the rest (2017-11-29)

Expand All @@ -37,3 +31,6 @@ current - 2018-03-31 - 0.00Mb
* `11`: create graph image with blockdiag (2017-08-18)
* `10`: fix download_data (2017-08-12)
* `9`: Finance (2017-08-05)
* `5`: allow to submit a hive job on HDInsight from a notebook (2017-02-25)
* `6`: fix appveyor build (2016-06-22)
* `4`: use pyquickhelper magic parser to interpret python variable for azure magic commands (2016-05-14)
2 changes: 1 addition & 1 deletion _doc/sphinxdoc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import sys
import os
import datetime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@brief test log(time=76s)
"""
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_documentation/test_run_notebooks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@brief test log(time=43s)
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
from pyquickhelper.pycode.utils_tests_helper import _extended_refactoring


class TestFlake8(unittest.TestCase):
class TestCodeStyle(unittest.TestCase):

def test_flake8_src(self):
def test_code_style_src(self):
fLOG(
__file__,
self._testMethodName,
Expand All @@ -40,15 +40,15 @@ def test_flake8_src(self):
if sys.version_info[0] == 2 or "Anaconda" in sys.executable \
or "condavir" in sys.executable:
warnings.warn(
"skipping test_flake8 because of Python 2 or " + sys.executable)
"skipping test_code_style because of Python 2 or " + sys.executable)
return

thi = os.path.abspath(os.path.dirname(__file__))
src_ = os.path.normpath(os.path.join(thi, "..", "..", "src"))
check_pep8(src_, fLOG=fLOG, extended=[("fLOG", _extended_refactoring)],
neg_filter="((.*Listener[.]py)|(.*pigjar.?pig.*[.]py)|(.*Parser[.]py)|(.*Lexer[.]py))$")

def test_flake8_test(self):
def test_code_style_test(self):
fLOG(
__file__,
self._testMethodName,
Expand All @@ -57,7 +57,7 @@ def test_flake8_test(self):
if sys.version_info[0] == 2 or "Anaconda" in sys.executable \
or "condavir" in sys.executable:
warnings.warn(
"skipping test_flake8 because of Python 2 or " + sys.executable)
"skipping test_code_style because of Python 2 or " + sys.executable)
return

thi = os.path.abspath(os.path.dirname(__file__))
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_sql/test_summary.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@brief test log(time=13s)
"""
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Module *pyense*.
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/datasource/data_velib.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding:utf-8 -*-
# -*- coding:utf-8 -*-
"""
@file
@brief The file contains a class which collects data coming from Velib.
Expand Down
4 changes: 2 additions & 2 deletions src/pyensae/datasource/linkedin_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ class LinkedInAccess:
'location',
'distance', 'num-connections', 'skills',
'educations',
#'school-name',
# 'school-name',
]

default_selectors_search_profile = [
{'people': ['id',
'first-name',
'last-name',
'educations',
#'school-name',
# 'school-name',
'public-profile-url',
'location', 'headline',
'last-modified-timestamp',
Expand Down
6 changes: 3 additions & 3 deletions src/pyensae/file_helper/content_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def replace_comma_by_point(file):
f.write(text)


def file_head(filename: str, nbline=10, encoding="utf8", errors: str=None):
def file_head(filename: str, nbline=10, encoding="utf8", errors=None):
"""
Extracts the first nbline of a file (assuming it is text file).
Extracts the first *nbline* of a file (assuming it is text file).
@param filename filename
@param nbline number of lines
Expand All @@ -47,7 +47,7 @@ def file_head(filename: str, nbline=10, encoding="utf8", errors: str=None):
return rows


def file_tail(filename: str, nbline=10, encoding="utf8", threshold=2 ** 14, errors: str=None):
def file_tail(filename: str, nbline=10, encoding="utf8", threshold=2 ** 14, errors=None):
"""
Extracts the first nbline of a file (assuming it is text file).
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/file_helper/magic_file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Magic command to handle files
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/file_helper/pig_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def clean(i, p):
"-Dpig.log.file=pid.log",
"-Djava.io.tmpdir=" + logpath,
"-Dpig.home.dir=" + pig_path,
#"-Dpig.schematuple=true",
# "-Dpig.schematuple=true",
#"-Dpig.schematuple.local.dir=" + logpath,
"org.apache.pig.Main",
"-x", "local", pigfile,
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/graph_helper/blockdiag_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Various functions about :epkg:`blockdiag`.
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/graph_helper/graphviz_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Various functions about graphviz.
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/graph_helper/magic_graph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Magic commands about graphs
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/graph_helper/matplotlib_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Various functions about matplotlib
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/ml_helper/joins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Complex joins with pandas.
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/ml_helper/missing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Missing values and pandas.
Expand Down
4 changes: 2 additions & 2 deletions src/pyensae/ml_helper/table_formula.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Adds functionalities to a dataframe.
Expand Down Expand Up @@ -180,7 +180,7 @@ def graph_XY(self, curves, xlabel=None, ylabel=None, marker=True,
fig, ax = plt.subplots(1, 1, figsize=figsize)

smarker = {(True, True): 'o-', (True, False): 'o', (False, True): '-',
#(False, False) :''
# (False, False) :''
}[marker, link_point]

has_date = False
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/notebook_helper/folium_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Module *folium* does not have any output to a notebook, addresses that issue. The module
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/notebook_helper/magic_notebook.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Magic command to help within notebooks
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/sql/database_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def connect(self, odbc_string=None):
"DATABASE=%s" % self._sql_file,
"Trusted_Connection=yes",
"MARS_Connection=yes",
#"MultipleActiveResultSets=True",
# "MultipleActiveResultSets=True",
#"Integrated Security=SSPI",
]
#temp = ["DSN=%s" % self._sql_file ]
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/sql/magic_sql.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Defines SQL commands to play with `sqlite3 <https://docs.python.org/3/library/sqlite3.html>`_.
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/sql/sql_interface.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Abstract class to connect to a SQL server using various way.
Expand Down
2 changes: 1 addition & 1 deletion src/pyensae/sql/sql_interface_database.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@file
@brief Abstract class to connect to a SQL server using various way.
Expand Down

0 comments on commit c526050

Please sign in to comment.