[Python-modules-commits] [pylint-celery] 01/02: Imported Upstream version 0.3

Daniel Stender danstender-guest at moszumanska.debian.org
Tue Jun 23 17:57:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

danstender-guest pushed a commit to branch master
in repository pylint-celery.

commit afebadf076d195f578fb8a671ae43c19d674024a
Author: Daniel Stender <debian at danielstender.com>
Date:   Tue Jun 23 19:53:29 2015 +0200

    Imported Upstream version 0.3
---
 PKG-INFO                                    | 11 ++++++++++
 pylint_celery.egg-info/PKG-INFO             | 11 ++++++++++
 pylint_celery.egg-info/SOURCES.txt          |  9 ++++++++
 pylint_celery.egg-info/dependency_links.txt |  1 +
 pylint_celery.egg-info/not-zip-safe         |  1 +
 pylint_celery.egg-info/requires.txt         |  3 +++
 pylint_celery.egg-info/top_level.txt        |  1 +
 pylint_celery/__init__.py                   | 34 +++++++++++++++++++++++++++++
 setup.cfg                                   |  5 +++++
 setup.py                                    | 23 +++++++++++++++++++
 test/test_func.py                           | 30 +++++++++++++++++++++++++
 11 files changed, 129 insertions(+)

diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..7547b2b
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,11 @@
+Metadata-Version: 1.0
+Name: pylint-celery
+Version: 0.3
+Summary: pylint-celery is a Pylint plugin to aid Pylint in recognising and understandingerrors caused when using the Celery library
+Home-page: https://github.com/landscapeio/pylint-celery
+Author: landscape.io
+Author-email: code at landscape.io
+License: GPLv2
+Description: UNKNOWN
+Keywords: pylint celery plugin
+Platform: UNKNOWN
diff --git a/pylint_celery.egg-info/PKG-INFO b/pylint_celery.egg-info/PKG-INFO
new file mode 100644
index 0000000..7547b2b
--- /dev/null
+++ b/pylint_celery.egg-info/PKG-INFO
@@ -0,0 +1,11 @@
+Metadata-Version: 1.0
+Name: pylint-celery
+Version: 0.3
+Summary: pylint-celery is a Pylint plugin to aid Pylint in recognising and understandingerrors caused when using the Celery library
+Home-page: https://github.com/landscapeio/pylint-celery
+Author: landscape.io
+Author-email: code at landscape.io
+License: GPLv2
+Description: UNKNOWN
+Keywords: pylint celery plugin
+Platform: UNKNOWN
diff --git a/pylint_celery.egg-info/SOURCES.txt b/pylint_celery.egg-info/SOURCES.txt
new file mode 100644
index 0000000..fd54968
--- /dev/null
+++ b/pylint_celery.egg-info/SOURCES.txt
@@ -0,0 +1,9 @@
+setup.py
+pylint_celery/__init__.py
+pylint_celery.egg-info/PKG-INFO
+pylint_celery.egg-info/SOURCES.txt
+pylint_celery.egg-info/dependency_links.txt
+pylint_celery.egg-info/not-zip-safe
+pylint_celery.egg-info/requires.txt
+pylint_celery.egg-info/top_level.txt
+test/test_func.py
\ No newline at end of file
diff --git a/pylint_celery.egg-info/dependency_links.txt b/pylint_celery.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/pylint_celery.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/pylint_celery.egg-info/not-zip-safe b/pylint_celery.egg-info/not-zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/pylint_celery.egg-info/not-zip-safe
@@ -0,0 +1 @@
+
diff --git a/pylint_celery.egg-info/requires.txt b/pylint_celery.egg-info/requires.txt
new file mode 100644
index 0000000..5c302f4
--- /dev/null
+++ b/pylint_celery.egg-info/requires.txt
@@ -0,0 +1,3 @@
+pylint>=1.0
+astroid>=1.0
+pylint-plugin-utils>=0.2.1
diff --git a/pylint_celery.egg-info/top_level.txt b/pylint_celery.egg-info/top_level.txt
new file mode 100644
index 0000000..afd3f6a
--- /dev/null
+++ b/pylint_celery.egg-info/top_level.txt
@@ -0,0 +1 @@
+pylint_celery
diff --git a/pylint_celery/__init__.py b/pylint_celery/__init__.py
new file mode 100644
index 0000000..f5e1d38
--- /dev/null
+++ b/pylint_celery/__init__.py
@@ -0,0 +1,34 @@
+from astroid import MANAGER
+from astroid.builder import AstroidBuilder
+from astroid import nodes
+
+
+def register(_):
+    # this method is expected by pylint for plugins, however we don't
+    # want to register any checkers
+    pass
+
+
+MODULE_TRANSFORMS = {}
+
+
+def transform(module):
+    try:
+        tr = MODULE_TRANSFORMS[module.name]
+    except KeyError:
+        pass
+    else:
+        tr(module)
+MANAGER.register_transform(nodes.Module, transform)
+
+
+def celery_transform(module):
+    fake = AstroidBuilder(MANAGER).string_build('''
+class task_dummy(object):
+    def __call__(self):
+        pass
+''')
+    module.locals['task'] = fake.locals['task_dummy']
+
+
+MODULE_TRANSFORMS['celery'] = celery_transform
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..861a9f5
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,5 @@
+[egg_info]
+tag_build = 
+tag_date = 0
+tag_svn_revision = 0
+
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..f6ccadf
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,23 @@
+# -*- coding: UTF-8 -*-
+from distutils.core import setup
+from setuptools import find_packages
+
+_version = "0.3"
+_packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"])
+
+_short_description = "pylint-celery is a Pylint plugin to aid Pylint in recognising and understanding" \
+                     "errors caused when using the Celery library"
+
+
+setup( name='pylint-celery',
+       url='https://github.com/landscapeio/pylint-celery',
+       author='landscape.io',
+       author_email='code at landscape.io',
+       description=_short_description,
+       version=_version,
+       packages=_packages,
+       install_requires=['pylint>=1.0', 'astroid>=1.0', 'pylint-plugin-utils>=0.2.1'],
+       license='GPLv2',
+       keywords='pylint celery plugin',
+       zip_safe=False,  # https://github.com/landscapeio/prospector/issues/18#issuecomment-49857277
+)
diff --git a/test/test_func.py b/test/test_func.py
new file mode 100644
index 0000000..98139d3
--- /dev/null
+++ b/test/test_func.py
@@ -0,0 +1,30 @@
+
+from os.path import join, dirname, abspath
+import unittest
+from logilab.common import testlib
+from pylint.testutils import make_tests, LintTestUsingModule, LintTestUsingFile, cb_test_gen, linter
+import sys
+
+
+INPUT_DIR = join(dirname(abspath(__file__)), 'input')
+MESSAGES_DIR = join(dirname(abspath(__file__)), 'messages')
+CALLBACKS = [cb_test_gen(LintTestUsingModule), cb_test_gen(LintTestUsingFile)]
+FILTER_RGX = None
+
+
+linter.load_plugin_modules(['pylint_celery'])
+linter.global_set_option('required-attributes', ())  # remove required __revision__
+
+
+def suite():
+    return testlib.TestSuite([unittest.makeSuite(test, suiteClass=testlib.TestSuite)
+                              for test in make_tests(INPUT_DIR, MESSAGES_DIR,
+                                                     FILTER_RGX, CALLBACKS)])
+
+if __name__=='__main__':
+    if len(sys.argv) > 1:
+        FILTER_RGX = sys.argv[1]
+        del sys.argv[1]
+    testlib.unittest_main(defaultTest='suite')
+
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pylint-celery.git



More information about the Python-modules-commits mailing list