pylint-dev / pylint-django Goto Github PK
View Code? Open in Web Editor NEWPylint plugin for improving code analysis for when using Django
License: Other
Pylint plugin for improving code analysis for when using Django
License: Other
Define the following models:
class FooModel(models.Model):
...
class Meta:
abstract = True
class BarModel(FooModel):
...
class Meta:
....
Then, enable pylint-django
and run pylint
on a module including these models.
Expected result: C1001
, W0232
, R0903
disabled for BarModel.Meta
.
Actual result: pylint
messages as if pylint-django
weren't included (but messages for Meta
on models inheriting directly from models.Model
are suppressed as expected)
If Django is not available, then lots of the type inference fails and the plugin is pretty hamstrung.
A pylint error should be raised to indicate that Django could not be found.
Note that this is preferable to using warnings.warn
as outputting directly to std_err
or std_out
causes problems for formatting in the 'upstream' tools.
Hi, I've got that here with 0.7.1:
$ PYTHONPATH=. python test/test_func.py
..................F
======================================================================
FAIL: test_functionality (pylint.testutils.LintTC)
file test of input file "func_noerror_form_fields" (LintTC)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pylint/testutils.py", line 323, in test_functionality
self._test(tocheck)
File "/usr/lib/python2.7/dist-packages/pylint/testutils.py", line 298, in _test
self._check_result(self.linter.reporter.finalize())
File "/usr/lib/python2.7/dist-packages/pylint/testutils.py", line 282, in _check_result
got.strip()+'\n')
AssertionError: '\n' != "E: 24:ManyFieldsForm: Module 'django.forms' has no 'IPAddressField' member\n"
-
+ E: 24:ManyFieldsForm: Module 'django.forms' has no 'IPAddressField' member
----------------------------------------------------------------------
Ran 19 tests in 2.952s
The build Django is 0.9.1 (IPAdressFiled dropped?).
Thanks,
DS
There should be a tag for 0.7.2.
Django test suites using self.client.get or self.client.post return HttpResponse, HttpResponseNotFound, HttpResponseServerError, HttpResponseRedirect, or WSGIRequest.
If you want to test the url of a HttpResponseRedirect you can check its url member.
response = self.client.get(reverse(views.index))
self.assertEqual(response.status_code, 302) # Not logged in, redirected to login
self.assertEqual(response.url, reverse('login'))
It works fine and the third line is not executed unless response is HttpResponseRedirect. You could also add
self.assertEqual(response.class, HttpResponseRedirect)
but in both cases pylint returns
p1/tests.py:47: [E1101(no-member), P1Tests.test_index] Instance of 'WSGIRequest' has no 'url' member
p1/tests.py:47: [E1101(no-member), P1Tests.test_index] Instance of 'HttpResponseServerError' has no 'url' member
p1/tests.py:47: [E1101(no-member), P1Tests.test_index] Instance of 'HttpResponseNotFound' has no 'url' member
p1/tests.py:47: [E1101(no-member), P1Tests.test_index] Instance of 'HttpResponse' has no 'url' member
any idea how to get rid of these errors?
I could add 'url' to 'generated-members' and the errors would disappear but it is not a good solution.
Sample code:
class A(Model):
x = IntegerField()
class B(Model):
a = ForeignKey(A)
y = IntegerField()
def doSomething(self):
self.y = self.a_id
This causes the error "Instance of 'B' has no 'a_id' member". Looks like the implicit _id members are not detected by pylint-django.
Currently only url and name attributes are being exposed to pylint through the transforms, however since under the covers these Fields are really instances of FieldFile and ImageFieldFile at runtime there are many more attributes that are needed such as the File operations, etc.
To resolve this locally I did the following within the django_db_models_fields_files.py transform definition which I think should be suitable as a solution here without having to enumerate all attributes exhaustively:
try:
from django.db.models.fields.files import FieldFile, ImageFieldFile
except ImportError:
FieldFile = object
ImageFieldFile = object
class FileField(FieldFile):
pass
class ImageField(ImageFieldFile):
pass
With _meta
being brought into the public API, it makes sense to exclude it from protected-access
.
Without the pylint_django plugin, pylint is silent on the line:
from django.db.models import Q
With it, pylint gives the error:
[no-name-in-module] No name 'models' in module 'django.db'
Code such as the following isn't currently filtered by pylint-django, and so results in a no-member
error message in pylint:
<model>.<related_name>.first()
<model>.<related_name>.last()
(Django 1.6 was the version where first()
and last()
were added to the queryset API)
Fixing this would just seem to require adding the items 'first' and 'last' to the manager_attrs list. Would that be possible, or are the words 'first' and 'last' considered too generic and a risk for false positives?
in urls.py I get:
pylint: invalid-name / Invalid constant name "urlpatterns"
When using register = template.Library()
for a template tag I get:
pylint: invalid-name / Invalid constant name "register"
I know I can add comment in code to ignore this but it would be better if support would be built in pylint.
Thanks for this great extension.
Currently pylint
with pylint-django
returns error pylint: [no-member] Instance of '__proxy__' has no 'format' member
for something like ugettet_lazy('').format
.
I fixed it by changing ugettext_lazy = lambda x: None
to ugettext_lazy = lambda x: ''
in file pylint_django/transforms/transforms/django_utils_translation.py
. Is it alright?
And seems like it's happening because of this import
from django.utils.translation import ugettext_lazy as _
Here's the traceback:
File "/..../lib/python3.4/site-packages/astroid/manager.py", line 337, in transform
ret = transform_func(node)
File "/..../lib/python3.4/site-packages/pylint_django/transforms/init.py", line 29, in set_fake_locals
module._locals[class_name] = fake._locals[class_name] # pylint: disable=protected-access
AttributeError: 'Module' object has no attribute '_locals'
Pylint and python version:
pylint 1.4.4,
astroid 1.3.8, common 1.1.0
Python 3.4.2 (default, Oct 8 2014, 10:45:20)
[GCC 4.9.1]
When I access a CharField in a model and call the upper() method, pylint complains. However, this is valid at runtime.
The exclude for Meta
being an old school class should be on BaseSerializer
no `ModelSerializer. BaseSerializers can have Meta too: https://github.com/tomchristie/django-rest-framework/blob/8c1365e315256f892dced348cf485bf966429596/rest_framework/serializers.py#L132
I have this Meta
class in one of my models:
class Meta:
unique_together = ('obj_1_id', 'obj_2_id', 'content_type')
This seemingly fine Meta
class generates these errors using pylint and pylint-django:
$ pylint --rcfile /dev/null -r n --load-plugins pylint_django models.py
[...]
C: 40, 8: Missing class docstring (missing-docstring)
W: 40, 8: Class has no __init__ method (no-init)
C: 40, 8: Old-style class defined. (old-style-class)
R: 40, 8: Too few public methods (0/2) (too-few-public-methods)
W: 40, 8: Unused variable 'Meta' (unused-variable)
I have these versions:
pylint==1.4.3
pylint-django==0.6.1
pylint-plugin-utils==0.2.3
Custom model managers have several errors of the form:
Instance of 'UserManager' has no 'exclude' member
If we have models inheriting from one another, and the parent model has a @python_2_unicode_compatible
decorator while the child fails to define unicode, we get a W5101 model-missing-unicode warning, when we should get a W5103 model-no-explicit-unicode warning. Minor, but does affect what pylint disable I should be placing on the code.
Hi,
I'm Joseph, a Debian maintainer and as I tested a bit your pylint plugin, I would like to have it uploaded as a Debian package in the Debian official directories.
What would it mean?
What would be needed on your side?
Thanks for your feedback.
Best,
Joseph
For example:
class MyModel(models.Model):
def __unicode__(self):
return str(self.id)
class MySubclassModel(MyModel):
pass
This will generate a warning for MySubclassModel about no __unicode__
method specified.
Define a ModelForm
:
# models.py
class Foo(models.Model):
...
# forms.py
class FooForm(forms.ModelForm):
class Meta:
...
On running pylint
with pylint_django
, messages are shown for FooForm.Meta
(C1001
, W0232
, R0903
). It would be nice if these messages were suppressed as they are for Meta
classes in Model
subclasses.
In pylintrc disabled the model-missing-unicode error, But its not working as we expected. We have integrated with prospector.
In .pylintrc,
disable=W5101 # W5101 - No unicode method on model
## OutPut
Line: 177
pylint: model-missing-unicode / No unicode method on model (Model1)
Line: 184
pylint: model-no-explicit-unicode / Model does not explicitly define unicode (Model2)
Line: 190
pylint: model-missing-unicode / No unicode method on model (Model3)
Line: 199
pylint: model-missing-unicode / No unicode method on model (Model4)
Note: Other disable options(cyclic-import, locally-disabled) is working fine
We tried using landscape.io with this plugin.
Unfortunately, there seem to be false positives (especially concerning forms).
See for example here: https://landscape.io/github/hubx/EvaP/4/modules/evap/fsr/forms.py
The model decorater @python_2_unicode_compatible
can be used to turn a __str__
method return a unicode string (py2 unicode, py3 string) into the required __unicode__
on python 2.
pylint-django currently gives the message [W5101] No __unicode__ method on model (ModelName)
for a class like:
@python_2_unicode_compatible
class ModelName(models.Model):
name = models.CharField(max_length=200)
def __str__(self):
return self.name
See the Django Python 3 porting guide for details: https://docs.djangoproject.com/en/1.6/topics/python3/#str-and-unicode-methods
I discovered pylint-django after finding this stackoverflow thread.
However I still have some false pylint errors working with django:
[no-member] Instance of 'Item' has no 'full_clean' member
[no-member] Instance of 'Item' has no 'save' member
Is this something that pylint-django can help out with at all? Or is it some peculiar behaviour of django with forms and models that makes hard to deal with?
The following test code:
response = self.client.get(self.url)
self.assertEqual(response.context['object'], expected_object)
…causes the following pylint message:
E:256,52: Instance of 'WSGIRequest' has no 'context' member (no-member)
pylint==1.5.6 and pylint-django==0.7.2.
I tried making the change myself in the is_model_meta_subclass
parents whitelist but it didn't work.
The node_is_subclass
check fails because inferred(base_cls)()
returns [YES]
instead of (presumably) a ClassDef
node, but I couldn't track it down much further. It may have to do with the way that the Meta class is configured in django-tables2
. See here.
Hi I got an error while try to run pylint with pylint_django
Traceback (most recent call last):
File "/usr/local/bin/pylint", line 9, in <module>
load_entry_point('pylint==1.4.1', 'console_scripts', 'pylint')()
File "/Library/Python/2.7/site-packages/pylint/__init__.py", line 23, in run_pylint
Run(sys.argv[1:])
File "/Library/Python/2.7/site-packages/pylint/lint.py", line 1221, in __init__
linter.load_plugin_modules(plugins)
File "/Library/Python/2.7/site-packages/pylint/lint.py", line 450, in load_plugin_modules
module = modutils.load_module_from_name(modname)
File "/Library/Python/2.7/site-packages/astroid/modutils.py", line 137, in load_module_from_name
return load_module_from_modpath(dotted_name.split('.'), path, use_sys)
File "/Library/Python/2.7/site-packages/astroid/modutils.py", line 179, in load_module_from_modpath
mp_file, mp_filename, mp_desc = imp.find_module(part, path)
ImportError: No module named pylint_django
python -c "import pylint_django"
- works fine
Versions:
OS: OS X 10.11.4
Python: 2.7.10
pylint: 1.5.5
pylint-django: 0.7.1
File "lib/python3.4/site-packages/pylint_django/utils.py", line 3, in <module>
from astroid.bases import YES, Instance
ImportError: cannot import name 'YES'
If I fix that then:
File "lib/python3.4/site-packages/pylint/lint.py", line 486, in load_plugin_modules
module.register(self)
File "lib/python3.4/site-packages/pylint_django/plugin.py", line 34, in register
apply_augmentations(linter)
File "lib/python3.4/site-packages/pylint_django/augmentations/__init__.py", line 300, in apply_augmentations
augment_visit(linter, TypeChecker.visit_getattr, foreign_key_sets)
AttributeError: type object 'TypeChecker' has no attribute 'visit_getattr'
The following test script produces an error when linted and it seems to me that it should not:
"""Test case."""
from django.contrib.auth.models import User
User.objects.get(email="hello", password="there")
E: 3, 0: Instance of 'UserManager' has no 'get' member (no-member)
(This is with Python 3.4.3, Django 1.8.7.)
Can you give us an idea of what to expect with pull requests being merged, and new versions released? A number of improvements are in the iXce fork: https://github.com/iXce/pylint-django
Should we continue to wait, or should we move onto a new fork?
The following code generates an error:
return super().get_queryset()\
.filter(capability=self.kwargs['capability'])
views.py [unsubscriptable-object] Value 'self.kwargs' is unsubscriptable [python/pylint]
Running pylint with pylint-django on Travis CI suddently fails:
Traceback (most recent call last):
File "/home/travis/virtualenv/python2.7.8/bin/pylint", line 9, in <module>
load_entry_point('pylint==1.3.1', 'console_scripts', 'pylint')()
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/__init__.py", line 21, in run_pylint
Run(sys.argv[1:])
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/lint.py", line 991, in __init__
linter.check(args)
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/lint.py", line 585, in check
self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/lint.py", line 662, in check_astroid_module
walker.walk(astroid)
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/utils.py", line 804, in walk
self.walk(child)
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/utils.py", line 806, in walk
cb(astroid)
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint_plugin_utils/__init__.py", line 54, in augment_func
augmentation(chain, node)
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint_plugin_utils/__init__.py", line 118, in do_suppress
if test_func(node):
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint_django/augmentations/__init__.py", line 203, in is_model_view_subclass_unused_argument
if not is_model_view_subclass_method_shouldnt_be_function(node):
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint_django/augmentations/__init__.py", line 195, in is_model_view_subclass_method_shouldnt_be_function
return parent.name.endswith('View') and node_is_subclass(parent, subclass)
AttributeError: 'NoneType' object has no attribute 'name'
Thanks for the awesome plugin! Any word on when you're planning to add support for Django 1.7?
Pylint-django works as advertised on a field declared like this:
field = ForeignKey(TheModel)
But not on this equivalent field:
field = ForeignKey('appname.TheModel')
It doesn't make sense to require a __unicode__
method on an abstract class.
class ExampleView(DetailView):
def get(self, request, some_id):
This results in a message: "Arguments number differs from overridden method"
File "/edx/app/edxapp/venvs/edxapp/bin/pylint", line 11, in <module>
sys.exit(run_pylint())
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint/__init__.py", line 23, in run_pylint
Run(sys.argv[1:])
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint/lint.py", line 1315, in __init__
linter.check(args)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint/lint.py", line 734, in check
self._do_check(files_or_modules)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint/lint.py", line 865, in _do_check
self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint/lint.py", line 945, in check_astroid_module
walker.walk(ast_node)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint/utils.py", line 938, in walk
self.walk(child)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint/utils.py", line 935, in walk
cb(astroid)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint/checkers/variables.py", line 1025, in visit_importfrom
self._check_module_attrs(node, module, name.split('.'))
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint/checkers/variables.py", line 1091, in _check_module_attrs
module = next(module.getattr(name)[0].infer())
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/astroid/bases.py", line 364, in infer
return self._explicit_inference(self, context, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pylint_django/transforms/fields.py", line 37, in apply_type_shim
if sys.versioninfo >= (3, 5):
AttributeError: 'module' object has no attribute 'versioninfo'
In the fake module mongoengine, the fake Document class is defined as
from mongoengine.errors import DoesNotExist, MultipleObjectsReturned
class Document(object):
_meta = None
objects = None
id = None
pk = None
MultipleObjectsReturned = MultipleObjectsReturned
DoesNotExist = DoesNotExist
save = lambda: None
which member objects gives a None. The fact in mongoengine it should be a mongoengine.QuerySetManager, which is callable, and can be used as query method.
For now, the code
SomeDocument.objects(query)
pylint gives out a E1102. That should be fixed.
As of astroid 1.3.3, class method resolution order is taken into consideration: https://bitbucket.org/logilab/astroid/commits/b1d8107715a4ceeeeb3f4a9065b67817e8cdc643
This caused an infinite loop when using pylint-django, as the model and form field transforms extended the base Django object then replaced it. This caused the MRO lookup to find a class as its own ancestor.
Hi,
I am sorry to bother you and I am unsure if this right way of doing this.
I tested pylint-django on two Red Hat Linux Environments one works fine I am getting report back which different to the default pylint report
but when I tried it again on another Red Hat Linux Environment it doesn't work and it gives report the same as the default pylint report and no error is showing to tell me why this happening.
I am using pylint --load-plugins pylint_django file.py on the command line.
I was wondering what can cause this problem. Is there something I have installed that could be causing this.
Thank you for any help you can give me.
pylint_django
complains about Django-generated code:
$ django-admin startproject testproj
$ cd testproj
$ pylint --load-plugins pylint_django testproj
No config file found, using default configuration
************* Module testproj.wsgi
C: 16, 0: Invalid constant name "application" (invalid-name)
…
Using: pylint==1.5.6 and pylint-django==0.7.2.
Code like this:
widget=forms.TextInput(attrs={
'class': 'form-control',
'placeholder': 'Last Name'
})
ends up with errors like this:
Unexpected keyword argument 'attrs' in constructor call
$ pylint --load-plugins pylint_django projectname | egrep '^\*|^E:'
Traceback (most recent call last):
File "/usr/bin/pylint", line 9, in <module>
load_entry_point('pylint==1.4.3', 'console_scripts', 'pylint')()
File "/usr/lib/python2.7/site-packages/pylint/__init__.py", line 23, in run_pylint
Run(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 1332, in __init__
************* Module projectname.external
************* Module projectname.SECRET_KEY
linter.check(args)
File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 747, in check
self._do_check(files_or_modules)
File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 869, in _do_check
self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 946, in check_astroid_module
walker.walk(ast_node)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 874, in walk
self.walk(child)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 874, in walk
self.walk(child)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 871, in walk
cb(astroid)
File "/usr/lib/python2.7/site-packages/pylint_plugin_utils/__init__.py", line 54, in augment_func
augmentation(chain, node)
File "/usr/lib/python2.7/site-packages/pylint_plugin_utils/__init__.py", line 127, in do_suppress
chain()
File "/usr/lib/python2.7/site-packages/pylint_plugin_utils/__init__.py", line 53, in chain
old_method(node)
File "/usr/lib/python2.7/site-packages/pylint/checkers/base.py", line 1021, in visit_assname
if isinstance(safe_infer(ass_type.value), astroid.Class):
File "/usr/lib/python2.7/site-packages/pylint/checkers/utils.py", line 92, in safe_infer
value = next(inferit)
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 327, in wrapped
for res in _func(node, context, **kwargs):
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 351, in wrapper
for node in func(*args, **kwargs):
File "/usr/lib/python2.7/site-packages/astroid/inference.py", line 196, in infer_callfunc
for infered in callee.infer_call_result(self, callcontext):
File "/usr/lib/python2.7/site-packages/astroid/scoped_nodes.py", line 835, in infer_call_result
for infered in returnnode.value.infer(context):
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 86, in cache_generator
for result in generator:
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 327, in wrapped
for res in _func(node, context, **kwargs):
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 351, in wrapper
for node in func(*args, **kwargs):
File "/usr/lib/python2.7/site-packages/astroid/inference.py", line 190, in infer_callfunc
for callee in self.func.infer(context):
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 86, in cache_generator
for result in generator:
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 327, in wrapped
for res in _func(node, context, **kwargs):
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 124, in _infer_stmts
for infered in stmt.infer(context):
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 86, in cache_generator
for result in generator:
File "/usr/lib/python2.7/site-packages/astroid/bases.py", line 327, in wrapped
for res in _func(node, context, **kwargs):
File "/usr/lib/python2.7/site-packages/astroid/inference.py", line 229, in infer_from
module = self.do_import_module()
File "/usr/lib/python2.7/site-packages/astroid/mixins.py", line 107, in do_import_module
return mymodule.import_module(modname, level=level)
File "/usr/lib/python2.7/site-packages/astroid/scoped_nodes.py", line 431, in import_module
return MANAGER.ast_from_module_name(modname)
File "/usr/lib/python2.7/site-packages/astroid/manager.py", line 160, in ast_from_module_name
return self.ast_from_file(filepath, modname, fallback=False)
File "/usr/lib/python2.7/site-packages/astroid/manager.py", line 112, in ast_from_file
return AstroidBuilder(self).file_build(filepath, modname)
File "/usr/lib/python2.7/site-packages/astroid/builder.py", line 134, in file_build
module = self._data_build(data, modname, path)
File "/usr/lib/python2.7/site-packages/astroid/builder.py", line 177, in _data_build
module = rebuilder.visit_module(node, modname, node_file, package)
File "/usr/lib/python2.7/site-packages/astroid/rebuilder.py", line 150, in visit_module
return self._transform(newnode)
File "/usr/lib/python2.7/site-packages/astroid/manager.py", line 337, in transform
ret = transform_func(node)
File "/usr/lib/python2.7/site-packages/pylint_django/transforms/__init__.py", line 29, in set_fake_locals
module._locals[class_name] = fake._locals[class_name] # pylint: disable=protected-access
AttributeError: 'Module' object has no attribute '_locals'
A ForeignKey
field on a model results in logs of "instance of ForeignKey has no member x" warnings as pylint does not know that Django swaps out the attribute.
If you have a model SomeModel
and in your code you use raise SomeModel.DoesNotExist
, due to the transformation in pylint_django/transforms/transforms/django_db_models.py
pylint raises E0702.
This code should raise no errors.
I am using the ModelSerializer in Django REST Framework and pylint-django is marking the following code as old-style-class:
class MySerializer(serializers.ModelSerializer):
class Meta:
model = MyModel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.