Fix typos and long lines
Change-Id: I316f63323b9e93efdb69c6cf9af47bf39580b871
diff --git a/KorAPClient/__init__.py b/KorAPClient/__init__.py
index aeb5864..19ae5c7 100644
--- a/KorAPClient/__init__.py
+++ b/KorAPClient/__init__.py
@@ -13,10 +13,12 @@
KorAPClient = packages.importr('RKorAPClient')
if version.parse(KorAPClient.__version__) < version.parse(CURRENT_R_PACKAGE_VERSION):
- warnings.warn("R-package RKorAPClient version " + KorAPClient.__version__ + " is outdated, please update.", DeprecationWarning)
+ warnings.warn("R-package RKorAPClient version " + KorAPClient.__version__ + " is outdated, please update.",
+ DeprecationWarning)
pandas2ri.activate()
+
# noinspection PyPep8Naming
class KorAPConnection(RS4):
"""Connection to a KorAP server."""
@@ -31,7 +33,7 @@
- **userAgent** (default = `"Python-KorAP-Client"`)
- **timeout** (default = 110)
- **verbose** (default = False)
- - **cache** (dafault = True)
+ - **cache** (default = True)
"""
if 'userAgent' not in kwargs:
kwargs["userAgent"] = "Python-KorAP-Client"
diff --git a/KorAPClient/tests/test_korapclient.py b/KorAPClient/tests/test_korapclient.py
index 0d19f8e..2160153 100644
--- a/KorAPClient/tests/test_korapclient.py
+++ b/KorAPClient/tests/test_korapclient.py
@@ -24,20 +24,22 @@
self.assertLess(df['pmi'][0], 20)
def test_collocation_analysis(self):
- df = self.kcon.collocationAnalysis( "focus([tt/p=ADJA] {Newstickeritis})", vc = "corpusSigle=/W.D17/", leftContextSize=1, rightContextSize=0,
+ df = self.kcon.collocationAnalysis("focus([tt/p=ADJA] {Newstickeritis})", vc="corpusSigle=/W.D17/",
+ leftContextSize=1, rightContextSize=0,
searchHitsSampleLimit=1, topCollocatesLimit=1,
exactFrequencies=False)
self.assertEqual(df['rightContextSize'][0], 0)
self.assertGreater(df['O'][0], df['E'][0])
def test_collocation_score_query_multi_collocates(self):
- df = self.kcon.collocationScoreQuery("Ameisenplage", ["einer", "heimgesucht"], leftContextSize=1, rightContextSize=1)
+ df = self.kcon.collocationScoreQuery("Ameisenplage", ["einer", "heimgesucht"], leftContextSize=1,
+ rightContextSize=1)
self.assertEqual(df['collocate'][1], 'heimgesucht')
self.assertGreater(df['pmi'][1], df['pmi'][0])
def test_corpus_stats(self):
df = self.kcon.corpusStats(**{"as.df": True})
- self.assertGreater(df['tokens'][0], 10**10)
+ self.assertGreater(df['tokens'][0], 10 ** 10)
def test_corpus_stats_with_vc(self):
de_tokens = self.kcon.corpusStats(vc='pubPlaceKey="DE"', **{"as.df": True})['tokens'][0]
@@ -48,5 +50,6 @@
tokens = self.kcon.corpusStats(vc=['pubPlaceKey="DE"', 'pubPlaceKey="CH"'], **{"as.df": True})['tokens']
self.assertGreater(tokens[0], tokens[1])
+
if __name__ == '__main__':
unittest.main()