Repository: roskakori/pygount (python)

Issue:
"pygount ." does nothing
For some reason pygount . does nothing and just exits, but pygount `pwd` works.

Pull request:
#56 Fixed scanning of "." (current folder)
Closes #56.

Patch:
diff --git a/dev-requirements.txt b/dev-requirements.txt
index 4c21f46..9478992 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -1,11 +1,11 @@
 black==19.10b0; python_version >= '3.6'
 chardet==3.0.4
-coverage==5.1
-coveralls==2.0.0
+coverage==5.2.1
+coveralls==2.1.2
 pre-commit==2.6.0; python_version >= '3.6'  # pre-commit 2.1 requires Python 3.6+
 pygments==2.6.1  # Pygments 2.5.0 changed Java's "{}" from Operator to Punctuation, earlier versions would break tests.
-pytest==5.4.3
+pytest==6.0.1
 pytest-cov==2.10.0
-setuptools==49.1.0
+setuptools==49.3.1
 twine==3.2.0; python_version >= '3.6'  # twine 3.1 requires Python 3.6+
 wheel==0.34.2
diff --git a/docs/changes.rst b/docs/changes.rst
index fd0a3de..e1c542c 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -5,6 +5,12 @@ Changes
 
 This chapter describes the changes coming with each new version of pygount.
 
+Version 1.2.4, 2020-08-11
+
+* Fixed scanning of "." (for current folder), which was skipped entirely
+  (issue `#56 <https://github.com/roskakori/pygount/issues/56>`_).
+
+
 Version 1.2.3, 2020-07-05
 
 * Improved detection of text files by trying to guess a lexer for
diff --git a/docs/requirements.txt b/docs/requirements.txt
index df576e7..de45415 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,2 +1,2 @@
-Sphinx==3.1.2
+Sphinx==3.2.0
 sphinx_rtd_theme==0.5.0
diff --git a/pygount/analysis.py b/pygount/analysis.py
index cd4a6d2..3113dd7 100644
--- a/pygount/analysis.py
+++ b/pygount/analysis.py
@@ -39,7 +39,7 @@ DEFAULT_FALLBACK_ENCODING = "cp1252"
 
 #: Default glob patterns for folders not to analyze.
 DEFAULT_FOLDER_PATTERNS_TO_SKIP_TEXT = ", ".join(
-    [".*", "_svn", "__pycache__"]  # Subversion hack for Windows  # Python byte code
+    [".?*", "_svn", "__pycache__"]  # Subversion hack for Windows  # Python byte code
 )
 
 
diff --git a/pygount/common.py b/pygount/common.py
index 603a25c..843739f 100644
--- a/pygount/common.py
+++ b/pygount/common.py
@@ -11,7 +11,7 @@ import warnings
 from typing import Generator, List, Optional, Pattern, Sequence, Union
 
 
-__version__ = "1.2.3"
+__version__ = "1.2.4"
 
 
 #: Pseudo pattern to indicate that the remaining pattern are an addition to the default patterns.


Test patch:
diff --git a/tests/test_analysis.py b/tests/test_analysis.py
index fbd1957..aa829fb 100644
--- a/tests/test_analysis.py
+++ b/tests/test_analysis.py
@@ -55,6 +55,14 @@ class SourceScannerTest(TempFolderTest):
         scanned_names = [os.path.basename(source_path) for source_path, _ in scanner.source_paths()]
         assert scanned_names == [name_to_include]
 
+    def test_can_find_python_files_in_dot(self):
+        scanner = analysis.SourceScanner(["."], "py")
+        actual_paths = list(scanner.source_paths())
+        assert actual_paths != []
+        for python_path, _ in actual_paths:
+            actual_suffix = os.path.splitext(python_path)[1]
+            assert actual_suffix == ".py"
+
 
 class AnalysisTest(unittest.TestCase):
     def test_can_deline_tokens(self):