~valhalla/lesana-devel

[PATCH] Please mypy

Details
Message ID
<20220111160733.51730-1-fabrixxm@kirgroup.net>
DKIM signature
pass
Download raw message
- ignore libraries without typing info
- add `py.typed` marker file
- update .gitignore
---
 .gitignore           | 5 +++++
 lesana/collection.py | 2 +-
 lesana/command.py    | 2 +-
 lesana/py.typed      | 0
 lesana/types.py      | 2 +-
 setup.py             | 2 +-
 6 files changed, 9 insertions(+), 4 deletions(-)
 create mode 100644 lesana/py.typed

diff --git a/.gitignore b/.gitignore
index 8534f9c..c9c3b3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,8 @@
 .coverage
 
 .*.sw?
+
+build/
+dist/
+.mypy_cache
+*.egg-info
diff --git a/lesana/collection.py b/lesana/collection.py
index aa82a39..15af9f6 100644
--- a/lesana/collection.py
+++ b/lesana/collection.py
@@ -6,7 +6,7 @@ import shutil
 import uuid
 
 import ruamel.yaml
-import xapian
+import xapian   # type: ignore
 import jinja2
 
 from pkg_resources import resource_string, resource_filename
diff --git a/lesana/command.py b/lesana/command.py
index ac7eba2..5eeb71a 100644
--- a/lesana/command.py
+++ b/lesana/command.py
@@ -5,7 +5,7 @@ import subprocess
 import sys
 
 try:
-    import argcomplete
+    import argcomplete  # type: ignore
 except ImportError:
     argcomplete = False
 
diff --git a/lesana/py.typed b/lesana/py.typed
new file mode 100644
index 0000000..e69de29
diff --git a/lesana/types.py b/lesana/types.py
index 87c933a..181887b 100644
--- a/lesana/types.py
+++ b/lesana/types.py
@@ -10,7 +10,7 @@ import logging
 
 import dateutil.parser
 
-import xapian
+import xapian  # type: ignore
 
 logger = logging.getLogger(__name__)
 
diff --git a/setup.py b/setup.py
index 2545196..761f5fc 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@ setup(
     packages=find_packages(),
     scripts=['scripts/lesana'],
     package_data={
-        '': ['*.yaml', 'post-checkout']
+        '': ['*.yaml', 'post-checkout', 'py.typed']
     },
     test_suite='tests',
     install_requires=[
-- 
2.34.1
Reply to thread Export thread (mbox)