[Python-modules-commits] [pylint-django] 01/07: Import pylint-django_0.7.2.orig.tar.gz
Daniel Stender
stender at moszumanska.debian.org
Fri Jun 24 19:20:19 UTC 2016
This is an automated email from the git hooks/post-receive script.
stender pushed a commit to branch master
in repository pylint-django.
commit adcb426a3397f7a2f9acc2ef49782b964df6e308
Author: Daniel Stender <stender at debian.org>
Date: Fri Jun 24 20:52:43 2016 +0200
Import pylint-django_0.7.2.orig.tar.gz
---
.coveragerc | 3 -
.gitignore | 35 ---
.landscape.yaml | 8 -
.travis.yml | 20 --
CHANGELOG.md | 80 -----
CONTRIBUTORS.md | 8 -
LICENSE | 339 ---------------------
PKG-INFO | 20 ++
README.md | 41 ---
pylint_django.egg-info/PKG-INFO | 20 ++
pylint_django.egg-info/SOURCES.txt | 30 ++
pylint_django.egg-info/dependency_links.txt | 1 +
pylint_django.egg-info/not-zip-safe | 1 +
pylint_django.egg-info/requires.txt | 2 +
pylint_django.egg-info/top_level.txt | 1 +
pylint_django/augmentations/__init__.py | 20 +-
pylint_django/compat.py | 8 +
pylint_django/transforms/__init__.py | 7 +-
.../transforms/django_views_generic_base.py | 4 +-
pylint_django/transforms/transforms/mongoengine.py | 14 +
scripts/test.sh | 2 -
scripts/travis-build.sh | 9 -
scripts/travis-install.sh | 12 -
scripts/travis_skip.py | 8 -
setup.cfg | 5 +
setup.py | 6 +-
test/external_drf/func_noerror_serializer.py | 11 -
test/input/__init__.py | 0
test/input/func_model_does_not_use_unicode_py33.py | 19 --
test/input/func_model_requires_unicode_py_28.py | 22 --
test/input/func_model_unicode_parent_py_28.py | 15 -
test/input/func_noerror_classviews.py | 17 --
test/input/func_noerror_foreign_key_attributes.py | 21 --
test/input/func_noerror_foreign_key_ids.py | 17 --
test/input/func_noerror_foreign_key_sets.py | 28 --
test/input/func_noerror_foreignkeys.py | 49 ---
test/input/func_noerror_form_fields.py | 66 ----
test/input/func_noerror_forms_py33.py | 33 --
test/input/func_noerror_forms_py_28.py | 33 --
test/input/func_noerror_formview_ancestors.py | 10 -
test/input/func_noerror_ignore_meta_subclass.py | 12 -
test/input/func_noerror_issue_46.py | 11 -
test/input/func_noerror_manytomanyfield.py | 25 --
test/input/func_noerror_model_fields.py | 81 -----
test/input/func_noerror_model_unicode_callable.py | 15 -
test/input/func_noerror_model_unicode_lambda.py | 11 -
test/input/func_noerror_models_py33.py | 31 --
test/input/func_noerror_models_py_28.py | 34 ---
test/input/func_noerror_unicode_py2_compatible.py | 17 --
test/input/func_noerror_urls.py | 22 --
.../func_model_does_not_use_unicode_py33.txt | 1 -
.../messages/func_model_requires_unicode_py_28.txt | 1 -
test/messages/func_model_unicode_parent_py_28.txt | 1 -
test/test_func.py | 30 +-
tox.ini | 7 -
55 files changed, 159 insertions(+), 1185 deletions(-)
diff --git a/.coveragerc b/.coveragerc
deleted file mode 100644
index 6bbc560..0000000
--- a/.coveragerc
+++ /dev/null
@@ -1,3 +0,0 @@
-
-[run]
-source=pylint_django
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index d2d6f36..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,35 +0,0 @@
-*.py[cod]
-
-# C extensions
-*.so
-
-# Packages
-*.egg
-*.egg-info
-dist
-build
-eggs
-parts
-bin
-var
-sdist
-develop-eggs
-.installed.cfg
-lib
-lib64
-
-# Installer logs
-pip-log.txt
-
-# Unit test / coverage reports
-.coverage
-.tox
-nosetests.xml
-
-# Translations
-*.mo
-
-# Mr Developer
-.mr.developer.cfg
-.project
-.pydevproject
diff --git a/.landscape.yaml b/.landscape.yaml
deleted file mode 100644
index 4b8bab3..0000000
--- a/.landscape.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-uses:
- - django
-strictness: high
-doc-warnings: no
-max-line-length: 120
-ignore-paths:
- - scripts/
- - pylint_django/compat.py
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 096ab17..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-sudo: false
-language: python
-python:
- - "2.6"
- - "2.7"
- - "3.3"
- - "3.4"
- - "3.5"
-env:
- - DJANGO='Django>=1.4,<1.5' SKIP='3.3 3.4,3.5'
- - DJANGO='Django>=1.5,<1.6' SKIP='3.3 3.4,3.5'
- - DJANGO='Django>=1.6,<1.7' SKIP='3.4,3.5'
- - DJANGO='Django>=1.7,<1.8' SKIP='2.6'
- - DJANGO='Django>=1.8,<1.9' SKIP='2.6'
-install:
- scripts/travis-install.sh
-script:
- scripts/travis-build.sh
-after_success:
- coveralls
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 2cfa0ad..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# Changelog
-
-## Version 0.7.1
-* [#52](https://github.com/landscapeio/pylint-django/issues/52) - Fixed stupid mistake when using versioninfo
-
-## Version 0.7
-* [#51](https://github.com/landscapeio/pylint-django/issues/51) - Fixed compatibility with pylint 1.5 / astroid 1.4.1
-
-## Version 0.6.1
-* [#43](https://github.com/landscapeio/pylint-django/issues/43) - Foreign key ID access (`somefk_id`) does not raise an 'attribute not found' warning
-* [#31](https://github.com/landscapeio/pylint-django/issues/31) - Support for custom model managers (thanks [smirolo](https://github.com/smirolo))
-* [#48](https://github.com/landscapeio/pylint-django/pull/48) - Added support for django-restframework (thanks [mbertolacci](https://github.com/mbertolacci))
-
-## Version 0.6
-* Pylint 1.4 dropped support for Python 2.6, therefore a constraint is added that pylint-django will only work with Python2.6 if pylint<=1.3 is installed
-* [#40](https://github.com/landscapeio/pylint-django/issues/40) - pylint 1.4 warned about View and Model classes not having enough public methods; this is suppressed
-* [#37](https://github.com/landscapeio/pylint-django/issues/37) - fixed an infinite loop when using astroid 1.3.3+
-* [#36](https://github.com/landscapeio/pylint-django/issues/36) - no longer warning about lack of `__unicode__` method on abstract model classes
-* [PR #34](https://github.com/landscapeio/pylint-django/pull/34) - prevent warning about use of `super()` on ModelManager classes
-
-## Version 0.5.5
-* [PR #27](https://github.com/landscapeio/pylint-django/pull/27) - better `ForeignKey` transforms, which now work when of the form `othermodule.ModelClass`. This also fixes a problem where an inferred type would be `_Yes` and pylint would fail
-* [PR #28](https://github.com/landscapeio/pylint-django/pull/28) - better knowledge of `ManyToManyField` classes
-
-## Version 0.5.4
-* Improved resiliance to inference failure when Django types cannot be inferred (which can happen if Django is not on the system path
-
-## Version 0.5.3
-* [Issue #25](https://github.com/landscapeio/pylint-django/issues/25) Fixing cases where a module defines `get` as a method
-
-## Version 0.5.2
-* Fixed a problem where type inference could get into an infinite loop
-
-## Version 0.5.1
-
-* Removed usage of a Django object, as importing it caused Django to try to configure itself and thus throw an ImproperlyConfigured exception.
-
-## Version 0.5
-
-* [Issue #7](https://github.com/landscapeio/pylint-django/issues/7)
-Improved handling of Django model fields
-* [Issue #10](https://github.com/landscapeio/pylint-django/issues/10)
-No warning about missing __unicode__ if the Django python3/2 compatability tools are used
-* [Issue #11](https://github.com/landscapeio/pylint-django/issues/11)
-Improved handling of Django form fields
-* [Issue #12](https://github.com/landscapeio/pylint-django/issues/12)
-Improved handling of Django ImageField and FileField objects
-* [Issue #14](https://github.com/landscapeio/pylint-django/issues/14)
-Models which do not define __unicode__ but whose parents do now have a new error (W5103)
-instead of incorrectly warning about no __unicode__ being present.
-* [Issue #21](https://github.com/landscapeio/pylint-django/issues/21)
-`ForeignKey` and `OneToOneField` fields on models are replaced with instance of the type
-they refer to in the AST, which allows pylint to generate correct warnings about attributes
-they may or may not have.
-
-
-## Version 0.3
-
-#### New Features
-
-* Python3 is now supported
-
-#### Bugfixes
-
-* `__unicode__` warning on models does not appear in Python3
-
-
-## Version 0.2
-
-#### New Features
-
-* Pylint now recognises `BaseForm` as an ancestor of `Form` and subclasses
-* Improved `Form` support
-
-#### Bugfixes
-
-* [Issue #2](https://github.com/landscapeio/pylint-django/issues/2) - a subclass of a `Model` or `Form` also has
-warnings about a `Meta` class suppressed.
-* [Issue #3](https://github.com/landscapeio/pylint-django/issues/3) - `Form` and `ModelForm` subclasses no longer
-warn about `Meta` classes.
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
deleted file mode 100644
index e3515a8..0000000
--- a/CONTRIBUTORS.md
+++ /dev/null
@@ -1,8 +0,0 @@
-* [carlio](https://github.com/carlio)
-* [mbarrien](https://github.com/mbarrien)
-* [frost-nzcr4](https://github.com/frost-nzcr4)
-* [ustun](https://github.com/ustun)
-* [jproffitt](https://github.com/jproffitt)
-* [lhupfeldt](https://github.com/lhupfeldt)
-* [smirolo](https://github.com/smirolo)
-* [mbertolacci](https://github.com/mbertolacci)
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 7730f89..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,339 +0,0 @@
-GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- Pylint plugin for improving code analysis for when using Django
- Copyright (C) 2013
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- {signature of Ty Coon}, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..2d5db29
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,20 @@
+Metadata-Version: 1.1
+Name: pylint-django
+Version: 0.7.2
+Summary: pylint-django is a Pylint plugin to aid Pylint in recognising and understandingerrors caused when using the Django framework
+Home-page: https://github.com/landscapeio/pylint-django
+Author: landscape.io
+Author-email: code at landscape.io
+License: GPLv2
+Description: UNKNOWN
+Keywords: pylint django plugin
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
+Classifier: Operating System :: Unix
+Classifier: Topic :: Software Development :: Quality Assurance
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff --git a/README.md b/README.md
deleted file mode 100644
index e1a5da6..0000000
--- a/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-pylint-django
-=============
-
-[![Build Status](https://travis-ci.org/landscapeio/pylint-django.png?branch=master)](https://travis-ci.org/landscapeio/pylint-django)
-[![Code Quality](https://landscape.io/github/landscapeio/pylint-django/master/landscape.png)](https://landscape.io/github/landscapeio/pylint-django)
-[![Coverage Status](https://coveralls.io/repos/landscapeio/pylint-django/badge.png)](https://coveralls.io/r/landscapeio/pylint-django)
-[![Latest Version](https://img.shields.io/pypi/v/pylint-django.svg)](https://pypi.python.org/pypi/pylint-django)
-
-# About
-
-`pylint-django` is a [Pylint](http://pylint.org) plugin for improving code analysis for when analysing code using Django. It is also used by the [Prospector](https://github.com/landscapeio/prospector) tool.
-
-## Usage
-
-#### Pylint
-
-Ensure `pylint-django` is installed and on your path (`pip install pylint-django`), and then run pylint:
-
-```
-pylint --load-plugins pylint_django [..other options..]
-```
-
-#### Prospector
-
-If you have `prospector` installed, then `pylint-django` will already be installed as a dependency, and will be activated automatically if Django is detected.
-
-```
-prospector [..other options..]
-```
-
-# Features
-
-* Prevents warnings about Django-generated attributes such as `Model.objects` or `Views.request`.
-* Prevents warnings when using `ForeignKey` attributes ("Instance of ForeignKey has no <x> member").
-* Fixes pylint's knowledge of the types of Model and Form field attributes
-* Validates `Model.__unicode__` methods.
-* `Meta` informational classes on forms and models do not generate errors.
-
-# License
-
-`pylint-django` is available under the GPLv2 license.
\ No newline at end of file
diff --git a/pylint_django.egg-info/PKG-INFO b/pylint_django.egg-info/PKG-INFO
new file mode 100644
index 0000000..2d5db29
--- /dev/null
+++ b/pylint_django.egg-info/PKG-INFO
@@ -0,0 +1,20 @@
+Metadata-Version: 1.1
+Name: pylint-django
+Version: 0.7.2
+Summary: pylint-django is a Pylint plugin to aid Pylint in recognising and understandingerrors caused when using the Django framework
+Home-page: https://github.com/landscapeio/pylint-django
+Author: landscape.io
+Author-email: code at landscape.io
+License: GPLv2
+Description: UNKNOWN
+Keywords: pylint django plugin
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
+Classifier: Operating System :: Unix
+Classifier: Topic :: Software Development :: Quality Assurance
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff --git a/pylint_django.egg-info/SOURCES.txt b/pylint_django.egg-info/SOURCES.txt
new file mode 100644
index 0000000..dde734e
--- /dev/null
+++ b/pylint_django.egg-info/SOURCES.txt
@@ -0,0 +1,30 @@
+MANIFEST.in
+setup.py
+pylint_django/__init__.py
+pylint_django/__pkginfo__.py
+pylint_django/compat.py
+pylint_django/plugin.py
+pylint_django/utils.py
+pylint_django.egg-info/PKG-INFO
+pylint_django.egg-info/SOURCES.txt
+pylint_django.egg-info/dependency_links.txt
+pylint_django.egg-info/not-zip-safe
+pylint_django.egg-info/requires.txt
+pylint_django.egg-info/top_level.txt
+pylint_django/augmentations/__init__.py
+pylint_django/checkers/__init__.py
+pylint_django/checkers/django_installed.py
+pylint_django/checkers/models.py
+pylint_django/transforms/__init__.py
+pylint_django/transforms/fields.py
+pylint_django/transforms/foreignkey.py
+pylint_django/transforms/transforms/django_core_handlers_wsgi.py
+pylint_django/transforms/transforms/django_db_models.py
+pylint_django/transforms/transforms/django_db_models_fields.py
+pylint_django/transforms/transforms/django_db_models_fields_files.py
+pylint_django/transforms/transforms/django_forms.py
+pylint_django/transforms/transforms/django_forms_fields.py
+pylint_django/transforms/transforms/django_utils_translation.py
+pylint_django/transforms/transforms/django_views_generic_base.py
+pylint_django/transforms/transforms/mongoengine.py
+test/test_func.py
\ No newline at end of file
diff --git a/pylint_django.egg-info/dependency_links.txt b/pylint_django.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/pylint_django.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/pylint_django.egg-info/not-zip-safe b/pylint_django.egg-info/not-zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/pylint_django.egg-info/not-zip-safe
@@ -0,0 +1 @@
+
diff --git a/pylint_django.egg-info/requires.txt b/pylint_django.egg-info/requires.txt
new file mode 100644
index 0000000..dde2041
--- /dev/null
+++ b/pylint_django.egg-info/requires.txt
@@ -0,0 +1,2 @@
+pylint-plugin-utils>=0.2.1
+pylint>=1.0
diff --git a/pylint_django.egg-info/top_level.txt b/pylint_django.egg-info/top_level.txt
new file mode 100644
index 0000000..0725d2c
--- /dev/null
+++ b/pylint_django.egg-info/top_level.txt
@@ -0,0 +1 @@
+pylint_django
diff --git a/pylint_django/augmentations/__init__.py b/pylint_django/augmentations/__init__.py
index 61600f2..29b31a3 100644
--- a/pylint_django/augmentations/__init__.py
+++ b/pylint_django/augmentations/__init__.py
@@ -6,7 +6,7 @@ from pylint.checkers.classes import ClassChecker
from pylint.checkers.newstyle import NewStyleConflictChecker
from pylint.checkers.variables import VariablesChecker
from astroid import InferenceError
-from pylint_django.compat import ClassDef, ImportFrom, Attribute
+from pylint_django.compat import ClassDef, ImportFrom, Attribute, django_version
from astroid.scoped_nodes import Class as ScopedClass, Module
from pylint.__pkginfo__ import numversion as PYLINT_VERSION
from pylint.checkers.typecheck import TypeChecker
@@ -162,6 +162,8 @@ def is_model_media_subclass(node):
'.Model', # for the transformed version used in this plugin
'django.forms.forms.Form',
'.Form',
+ 'django.forms.widgets.Widget',
+ '.Widget',
'django.forms.models.ModelForm',
'.ModelForm')
return node_is_subclass(node.parent, *parents)
@@ -284,7 +286,7 @@ def is_templatetags_module_valid_constant(node):
def is_urls_module_valid_constant(node):
"""Suppress warnings for valid constants in urls module."""
- if node.name not in ('urlpatterns', ):
+ if node.name not in ('urlpatterns', 'app_name'):
return False
parent = node.parent
@@ -297,6 +299,13 @@ def is_urls_module_valid_constant(node):
return True
+def allow_meta_protected_access(node):
+ if django_version >= (1, 8):
+ return node.attrname == '_meta'
+ else:
+ return False
+
+
def is_class(class_name):
"""Shortcut for node_is_subclass."""
return lambda node: node_is_subclass(node, class_name)
@@ -331,6 +340,10 @@ def _visit_assignname(checker):
return getattr(checker, 'visit_assignname' if PYLINT_VERSION >= (1, 5) else 'visit_assname')
+def _visit_assign(checker):
+ return getattr(checker, 'visit_assign')
+
+
def apply_augmentations(linter):
"""Apply augmentation and suppression rules."""
augment_visit(linter, _visit_attribute(TypeChecker), foreign_key_sets)
@@ -353,12 +366,13 @@ def apply_augmentations(linter):
suppress_message(linter, _visit_class(NewStyleConflictChecker), 'old-style-class', is_model_meta_subclass)
suppress_message(linter, _visit_class(ClassChecker), 'no-init', is_model_meta_subclass)
suppress_message(linter, _leave_class(MisdesignChecker), 'too-few-public-methods', is_model_meta_subclass)
+ suppress_message(linter, _visit_attribute(ClassChecker), 'protected-access', allow_meta_protected_access)
# Media
suppress_message(linter, _visit_assignname(NameChecker), 'C0103', is_model_media_valid_attributes)
suppress_message(linter, _visit_class(DocStringChecker), 'missing-docstring', is_model_media_subclass)
suppress_message(linter, _visit_class(NewStyleConflictChecker), 'old-style-class', is_model_media_subclass)
- #suppress_message(linter, _visit_class(ClassChecker), 'W0232', is_model_media_subclass)
+ suppress_message(linter, _visit_class(ClassChecker), 'no-init', is_model_media_subclass)
suppress_message(linter, _leave_class(MisdesignChecker), 'too-few-public-methods', is_model_media_subclass)
# Too few public methods started appearing for Views and Models as part of Pylint>=1.4 / astroid>=1.3.3
diff --git a/pylint_django/compat.py b/pylint_django/compat.py
index bb4f365..11a33cc 100644
--- a/pylint_django/compat.py
+++ b/pylint_django/compat.py
@@ -17,6 +17,14 @@ except ImportError:
from astroid.util import Uninferable
+try:
+ django = __import__('django')
+ django_version = django.VERSION
+except ImportError:
+ # if not available, will be handled by the django_installed checker
+ django_version = (1, 5)
+
+
def inferred(node):
if hasattr(node, 'inferred'):
return node.inferred
diff --git a/pylint_django/transforms/__init__.py b/pylint_django/transforms/__init__.py
index 25cae97..a038338 100644
--- a/pylint_django/transforms/__init__.py
+++ b/pylint_django/transforms/__init__.py
@@ -26,7 +26,11 @@ def _add_transform(package_name, *class_names):
if module.name != package_name:
return
for class_name in class_names:
- module._locals[class_name] = fake._locals[class_name] # pylint: disable=protected-access
+ # This changed from locals to _locals between astroid 1.3 and 1.4
+ if hasattr(module, '_locals'):
+ module._locals[class_name].extend(fake._locals[class_name]) # pylint: disable=protected-access
+ else:
+ module.locals[class_name].extend(fake.locals[class_name])
MANAGER.register_transform(nodes.Module, set_fake_locals)
@@ -39,3 +43,4 @@ _add_transform('django.db.models',
'Model',
'Manager')
_add_transform('django.utils.translation', 'ugettext_lazy')
+_add_transform('mongoengine', 'Document')
diff --git a/pylint_django/transforms/transforms/django_views_generic_base.py b/pylint_django/transforms/transforms/django_views_generic_base.py
index 329d921..2aac139 100644
--- a/pylint_django/transforms/transforms/django_views_generic_base.py
+++ b/pylint_django/transforms/transforms/django_views_generic_base.py
@@ -1,7 +1,7 @@
class View(object):
request = None
- args = None
- kwargs = None
+ args = ()
+ kwargs = {}
# as_view is marked as class-only
def as_view(*args, **kwargs):
diff --git a/pylint_django/transforms/transforms/mongoengine.py b/pylint_django/transforms/transforms/mongoengine.py
new file mode 100644
index 0000000..882425a
--- /dev/null
+++ b/pylint_django/transforms/transforms/mongoengine.py
@@ -0,0 +1,14 @@
+from mongoengine.errors import DoesNotExist, MultipleObjectsReturned
+from mongoengine.queryset.manager import QuerySetManager
+
+class Document(object):
+ _meta = None
+ objects = QuerySetManager()
+
+ id = None
+ pk = None
+
+ MultipleObjectsReturned = MultipleObjectsReturned
+ DoesNotExist = DoesNotExist
+
+ save = lambda: None
diff --git a/scripts/test.sh b/scripts/test.sh
deleted file mode 100755
index ad93a9a..0000000
--- a/scripts/test.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-python test/test_func.py
diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh
deleted file mode 100755
index 02251ca..0000000
--- a/scripts/travis-build.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-python scripts/travis_skip.py
-
-if [ "$?" -eq "0" ]
-then
- coverage run test/test_func.py
-else
- echo "Skipping"
-fi
diff --git a/scripts/travis-install.sh b/scripts/travis-install.sh
deleted file mode 100755
index a977c10..0000000
--- a/scripts/travis-install.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-python scripts/travis_skip.py
-
-if [ "$?" -eq "0" ]
-then
- pip install coverage coveralls
- pip install $DJANGO
- pip install git+https://github.com/landscapeio/pylint-plugin-utils.git@develop
- pip install --editable .
-else
- echo "Skipping"
-fi
diff --git a/scripts/travis_skip.py b/scripts/travis_skip.py
deleted file mode 100755
index 8b0932b..0000000
--- a/scripts/travis_skip.py
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env python
-import os
-import sys
-for skip_ver in os.environ.get('SKIP', '').split():
- skip_ver = tuple(map(int, skip_ver.split('.')))
- if skip_ver == sys.version_info[:len(skip_ver)]:
- sys.exit(1)
-sys.exit(0)
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
index cdf4d35..3c83397 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ import os
import sys
-_version = '0.7.1'
+_version = '0.7.2'
_packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"])
_short_description = "pylint-django is a Pylint plugin to aid Pylint in recognising and understanding" \
@@ -25,7 +25,6 @@ _classifiers = (
'Intended Audience :: Developers',
'Operating System :: Unix',
'Topic :: Software Development :: Quality Assurance',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
@@ -62,5 +61,6 @@ setup(
install_requires=_install_requires,
... 840 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pylint-django.git
More information about the Python-modules-commits
mailing list