Coder Social home page Coder Social logo

pylint-dev / pylint Goto Github PK

View Code? Open in Web Editor NEW
5.1K 79.0 1.1K 39.91 MB

It's not just a linter that annoys you!

Home Page: https://pylint.readthedocs.io/en/latest/

License: GNU General Public License v2.0

Python 99.86% HTML 0.05% Mermaid 0.08%
static-analysis linter static-code-analysis code-quality pep8 closember hacktoberfest

pylint's Introduction

image

image

Pypi Package version

Documentation Status

image

image

pre-commit.ci status

CII Best Practices

OpenSSF Scorecard

Discord

What is Pylint?

Pylint is a static code analyser for Python 2 or 3. The latest version supports Python 3.8.0 and above.

Pylint analyses your code without actually running it. It checks for errors, enforces a coding standard, looks for code smells, and can make suggestions about how the code could be refactored.

Install

For command line use, pylint is installed with:

pip install pylint

Or if you want to also check spelling with enchant (you might need to install the enchant C library):

pip install pylint[spelling]

It can also be integrated in most editors or IDEs. More information can be found in the documentation.

What differentiates Pylint?

Pylint is not trusting your typing and is inferring the actual value of nodes (for a start because there was no typing when pylint started off) using its internal code representation (astroid). If your code is import logging as argparse, Pylint can check and know that argparse.error(...) is in fact a logging call and not an argparse call. This makes pylint slower, but it also lets pylint find more issues if your code is not fully typed.

[inference] is the killer feature that keeps us using [pylint] in our project despite how painfully slow it is. - Realist pylint user, 2022

pylint, not afraid of being a little slower than it already is, is also a lot more thorough than other linters. There are more checks, including some opinionated ones that are deactivated by default but can be enabled using configuration.

How to use pylint

Pylint isn't smarter than you: it may warn you about things that you have conscientiously done or check for some things that you don't care about. During adoption, especially in a legacy project where pylint was never enforced, it's best to start with the --errors-only flag, then disable convention and refactor messages with --disable=C,R and progressively re-evaluate and re-enable messages as your priorities evolve.

Pylint is highly configurable and permits to write plugins in order to add your own checks (for example, for internal libraries or an internal rule). Pylint also has an ecosystem of existing plugins for popular frameworks and third-party libraries.

Note

Pylint supports the Python standard library out of the box. Third-party libraries are not always supported, so a plugin might be needed. A good place to start is PyPI which often returns a plugin by searching for pylint <library>. pylint-pydantic, pylint-django and pylint-sonarjson are examples of such plugins. More information about plugins and how to load them can be found at plugins.

Advised linters alongside pylint

Projects that you might want to use alongside pylint include ruff (really fast, with builtin auto-fix and a large number of checks taken from popular linters, but implemented in rust) or flake8 (a framework to implement your own checks in python using ast directly), mypy, pyright / pylance or pyre (typing checks), bandit (security oriented checks), black and isort (auto-formatting), autoflake (automated removal of unused imports or variables), pyupgrade (automated upgrade to newer python syntax) and pydocstringformatter (automated pep257).

Additional tools included in pylint

Pylint ships with two additional tools:

  • pyreverse (standalone tool that generates package and class diagrams.)
  • symilar (duplicate code finder that is also integrated in pylint)

Contributing

We welcome all forms of contributions such as updates for documentation, new code, checking issues for duplicates or telling us that we can close them, confirming that issues still exist, creating issues because you found a bug or want a feature, etc. Everything is much appreciated!

Please follow the code of conduct and check the Contributor Guides if you want to make a code contribution.

Show your usage

You can place this badge in your README to let others know your project uses pylint.

image

Learn how to add a badge to your documentation in the badge documentation.

License

pylint is, with a few exceptions listed below, GPLv2.

The icon files are licensed under the CC BY-SA 4.0 license:

Support

Please check the contact information.

Tidelift Professional support for pylint is available as part of the Tidelift Subscription. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.

pylint's People

Contributors

awhetter avatar bdanielby avatar brettcannon avatar brycepg avatar cdce8p avatar clavedeluna avatar danielnoord avatar dependabot[bot] avatar dimp-gh avatar dudenr33 avatar github-actions[bot] avatar godfryd avatar gurneyalex avatar harupy avatar hippo91 avatar jacobtylerwalls avatar jcristau avatar julthep avatar matusvalo avatar mbyrnepr2 avatar nickdrozd avatar pcmanticore avatar pierre-sassoulas avatar pre-commit-ci[bot] avatar rogalski avatar scop avatar sushobhit27 avatar tmarek-google avatar torstenmarek avatar yushao2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pylint's Issues

Way to analyze docstring and comments

Originally reported by: BitBucket: mitar, GitHub: @mitar?


It would be great if there would be a way to access docstrings and comments in their native context. For example, here are some checks I would like to do:

  • check that docstrings start and end with """ (and not ''') on their own line
  • check that there is an empty line after closing """
  • check that TODO comments are of the form # TODO: Sentence.

Pyreverse: ValueError: need more than 1 value to unpack

Originally reported by: Jorge Araya Navarro (BitBucket: shackra, GitHub: @shackra?)


I'm not sure what's happening...

#!bash

jorge [~/coders/desarrollo/thomas-aquinas] ~> pyreverse -c cocos2d -a 1 -s 1 -f ALL -o png summa/
parsing summa/__init__.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/utils.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/__init__.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/framegrabber.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/summanode.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/collision_model.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/text.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/menu.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/particle.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/batch.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/director.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/shader.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/wired.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/rect.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/skeleton.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/gl_framebuffer_object.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/camera.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/draw.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/tiles.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/custom_clocks.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/path.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/sprite.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/grid.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/particle_systems.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/scene.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/euclid.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/scenes/__init__.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/scenes/transitions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/scenes/pause.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/__init__.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/instant_actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/base_actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/grid3d_actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/camera_actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/tiledgrid_actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/move_actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/basegrid_actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/interval_actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/actions/quadmoveby_actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/__init__.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/music.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/vector.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/system.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/objectbase.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/sftime.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/libs.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/soundstatus.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/actions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/sfmusic.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/effect.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/listener.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/audio/exceptions.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/layer/__init__.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/layer/base_layers.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/layer/util_layers.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/layer/python_interpreter.py...
parsing /home/jorge/coders/desarrollo/thomas-aquinas/summa/layer/scrolling.py...
Traceback (most recent call last):
  File "/usr/bin/pyreverse", line 9, in <module>
    load_entry_point('pylint==0.28.0', 'console_scripts', 'pyreverse')()
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/__init__.py", line 39, in run_pyreverse
    Run(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/pyreverse/main.py", line 98, in __init__
    sys.exit(self.run(args))
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/pyreverse/main.py", line 112, in run
    diadefs = handler.get_diadefs(project, linker)
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/pyreverse/diadefslib.py", line 226, in get_diadefs
    diagrams.append(generator.class_diagram(project, klass))
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/pyreverse/diadefslib.py", line 194, in class_diagram
    module, klass = klass.rsplit('.', 1)
ValueError: need more than 1 value to unpack
jorge [~/coders/desarrollo/thomas-aquinas] ~>

Then I tried to parse that file directly to see what happen, and I got this:

#!bash

jorge [~/coders/desarrollo/thomas-aquinas] ~> pyreverse -c cocos2d -a 1 -s 1 -f ALL -o png summa/layer/scrolling.py
parsing summa/layer/scrolling.py...
Traceback (most recent call last):
  File "/usr/bin/pyreverse", line 9, in <module>
    load_entry_point('pylint==0.28.0', 'console_scripts', 'pyreverse')()
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/__init__.py", line 39, in run_pyreverse
    Run(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/pyreverse/main.py", line 98, in __init__
    sys.exit(self.run(args))
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/pyreverse/main.py", line 112, in run
    diadefs = handler.get_diadefs(project, linker)
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/pyreverse/diadefslib.py", line 226, in get_diadefs
    diagrams.append(generator.class_diagram(project, klass))
  File "/usr/lib/python2.7/site-packages/pylint-0.28.0-py2.7.egg/pylint/pyreverse/diadefslib.py", line 199, in class_diagram
    klass = module.ilookup(klass).next()
  File "/usr/lib/python2.7/site-packages/logilab_astng-0.24.3-py2.7.egg/logilab/astng/bases.py", line 124, in _infer_stmts
    raise InferenceError(str(stmt))
logilab.astng.exceptions.InferenceError: None
jorge [~/coders/desarrollo/thomas-aquinas] ~> 

The file is right here shackra/thomas-aquinas/src/summa/layer/scrolling.py...


pyreverse: Infinite loop with twisted

Originally reported by: Benjamin Arbogast (BitBucket: Koblaid, GitHub: @Koblaid?)


I ran pyreverse with twisted: /usr/lib/python2.7/dist-packages$ pyreverse -o png twisted/.

Some files are parsed but it seems to get stuck on parsing /usr/lib/python2.7/dist-packages/twisted/spread/ui/tktree.py....

I use python 2.7.3 with twisted 12.2.0-1 (unchanged Ubuntu package).


modes feature

Originally reported by: Sylvain Thénault (BitBucket: sthenault, GitHub: @sthenault?)


we would like to have modes which are a set of sections in the pylintrc file regrouping options overrides. A mode may be set using a command line option as well as in a specific file using inline instruction.

We may remove/deprecate -E option then.


apparent regression in testsuite; pylint-0.28.0

Originally reported by: BitBucket: idella5


I've repeated this many times and I still get these numerous errors fails.

=======================  test_import_graph.py  =======================
.E
======================================================================
ERROR: test_checker_dep_graphs (test_import_graph.ImportCheckerTC)
----------------------------------------------------------------------
Traceback (most recent call last)

*******************************************************************************
Ran 885 test cases in 27.11s (26.98s CPU), 15 errors, 4 failures, 3 skipped
7 modules OK (4 failed)

Far too many to list. sample of Error types;

TypeError: coercing to Unicode: need string or buffer, NoneType found
AttributeError: 'Function' object has no attribute 'ancestors'
AttributeError: 'tuple' object has no attribute 'infer'

how do your test runs fair?


pylintrc and warning docs lacking

Originally reported by: Andrew Pennebaker (BitBucket: mcandre, GitHub: @mcandre?)


I would like to customize the indentation width, but I don't know which warning applies, in the output:

#!shell

W: 24,0: Bad indentation. Found 2 spaces, expected 4
W: 26,0: Bad indentation. Found 2 spaces, expected 4
W: 29,0: Bad indentation. Found 2 spaces, expected 4
W: 31,0: Bad indentation. Found 2 spaces, expected 4

And even this were made clear, I don't know how to customize the warning in a pylintrc file. I know how to use .jshintrc files to customize JSHint, but pylint offers little documentation by comparison.


Pylint with threading

Originally reported by: BitBucket: horneds


Im the author of some code-quality libraries such as https://github.com/klen/pylama. I use that in my VIM plugin
https://github.com/klen/python-mode. Pylama is simular to flake8, but have some additional features and works also with pylint.

Today I would like to make code checking with pylama is more asynchronously. I haven't any problems with pyflake, pep8, pep257 and mccabe but cannot make pylint works. When I run pylint with a few threads I get errors like this: https://gist.github.com/klen/5721176. When one thread try to run pylint a more from one time I got this error.

I think the problem in ASTNG MANAGER and I try to clean that cache.

I tried to clear the cache in several ways https://gist.github.com/klen/5721225 but not have success.

Any ideas?


epylint hangs when pylint generates lots of stderr output

Originally reported by: Nikolaus Rath (BitBucket: nikratio, GitHub: @Nikratio?)


epylint currently starts pylint with stderr connected to a pipe. However, it never reads anything from the pipe. Therefore, if pylint generates enough output to saturate the internal buffer (which happens on larger stacktraces), epylint just hangs. In that case, epylint waits for pylint to terminate or write more data to stdout, but pylint hangs because it's waiting for someone to read from the stderr pipe.

I think the proper fix is to simply not connect stderr to a pipe, i.e. remove the stderr=PIPE argument to the Popen call.


W0221 false positive for property setter

Originally reported by: BitBucket: udifuchs


The following code:

#!python

class Foo(object):
    def __init__(self):
        self._bar = 3

    @property
    def bar(self):
        return self._bar

    @bar.setter
    def bar(self, value):
        self._bar = value

class Foo2(Foo):
    @bar.setter
    def bar(self, value):
        self._bar = value * 2

Results in the warning:

W0221: 15,4:Foo2.bar: Arguments number differs from overridden method

#!sh

$ pylint --version
pylint 0.26.0, 
astng 0.24.1, common 0.58.3
Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
[GCC 4.7.3]


E1101 false positives for exception variables

Originally reported by: Chris Rebert (BitBucket: cvrebert, GitHub: @cvrebert?)


Testcase:

#!python
# example.py
x = []

try:
    x[42]
except IndexError as err:
    err.message.find("out of range")

Somehow "message" ends up being treated as a class and the inaccurate warning gets repeated 5 times for some reason:

#!bash
$ pylint --include-ids=y --report=n example.py 
No config file found, using default configuration
************* Module example
C0111:  1,0: Missing docstring
C0103:  1,0: Invalid name "x" for type constant (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
E1101:  6,4: Class 'message' has no 'find' member
E1101:  6,4: Class 'message' has no 'find' member
E1101:  6,4: Class 'message' has no 'find' member
E1101:  6,4: Class 'message' has no 'find' member
E1101:  6,4: Class 'message' has no 'find' member
$ pylint --version
No config file found, using default configuration
pylint 0.28.0, 
astng 0.24.3, common 0.59.1
Python 2.7.5 (default, May 21 2013, 11:38:15) 
[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))]

Pylint 0.28 reports a false positive E1103 under Python 3.3

Originally reported by: Chris Wong (BitBucket: wongc, GitHub: @wongc?)


Given files: t.py, tmp/u.py and tmp/v.py (and of course an empty tmp/init.py)

t.py

#!python

import tmp.u
tmp.u.obfuscate()

tmp/u.py

#!python

from .v import *

tmp/v.py

#!python

def obfuscate():
    print("hello world")

I will always get a E1101 error under Python 3.3 for t.py

#!

************* Module t
C0111:  1,0: Missing docstring
E1101:  4,0: Module 'tmp.u' has no 'obfuscate' member

This works fine using Pylint under 2.6.


Crashes on missing import

Originally reported by: Nikolaus Rath (BitBucket: nikratio, GitHub: @Nikratio?)


Testcase:

#!

[22] nikratio@vostro:~/tmp$ ls mypackage/
module1.py

[0] nikratio@vostro:~/tmp$ cat mypackage/module1.py 
from .logging import logging

[0] nikratio@vostro:~/tmp$ pylint mypackage/module1.py 
************* Module module1
C0111:  1,0: Missing docstring
Traceback (most recent call last):
  File "/home/nikratio/.local/lib/python3.3/site-packages/logilab_astng-0.24.3-py3.3.egg/logilab/astng/manager.py", line 161, in file_from_module_name
    value = self._mod_file_cache[(modname, contextfile)]
KeyError: ('logging.logging', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nikratio/.local/lib/python3.3/site-packages/logilab_astng-0.24.3-py3.3.egg/logilab/astng/scoped_nodes.py", line 284, in getattr
    return [self.import_module(name, relative_only=True)]
  File "/home/nikratio/.local/lib/python3.3/site-packages/logilab_astng-0.24.3-py3.3.egg/logilab/astng/scoped_nodes.py", line 339, in import_module
    return MANAGER.astng_from_module_name(absmodname)
  File "/home/nikratio/.local/lib/python3.3/site-packages/logilab_astng-0.24.3-py3.3.egg/logilab/astng/manager.py", line 121, in astng_from_module_name
    filepath = self.file_from_module_name(modname, context_file)
  File "/home/nikratio/.local/lib/python3.3/site-packages/logilab_astng-0.24.3-py3.3.egg/logilab/astng/manager.py", line 165, in file_from_module_name
    context_file=contextfile)
  File "/home/nikratio/.local/lib/python3.3/site-packages/logilab_common-0.59.1-py3.3.egg/logilab/common/modutils.py", line 295, in file_from_modpath
    return _file_from_modpath(modpath, path, context)
  File "/home/nikratio/.local/lib/python3.3/site-packages/logilab_common-0.59.1-py3.3.egg/logilab/common/modutils.py", line 554, in _file_from_modpath
    mtype, mp_filename = _module_file(modpath, path)
  File "/home/nikratio/.local/lib/python3.3/site-packages/logilab_common-0.59.1-py3.3.egg/logilab/common/modutils.py", line 620, in _module_file
    emtype, emp_filename, zippath = _search_zip(modpath, pic)
  File "/home/nikratio/.local/lib/python3.3/site-packages/logilab_common-0.59.1-py3.3.egg/logilab/common/modutils.py", line 573, in _search_zip
    '.'.join(modpath[1:]), file, modpath))
NameError: global name 'file' is not defined
E0611:  1,0: No name 'logging' in module 'logging'
W0611:  1,0: Unused import logging
[22] nikratio@vostro:~/tmp$ 

Make pylint <dir> work like pylint <dir>/*.py

Originally reported by: Andrew Pennebaker (BitBucket: mcandre, GitHub: @mcandre?)


Most linters offer CLI syntax of linter

meaning lint all relevant files in a directory. Typically, users run linter ., to lint the current directory.

pylint rejects this for directories with no init.py, such as collections of standalone, one-off scripts. As a mitigation, we can use pylint *.py, but it would be nice to type pylint ., in keeping with conventional linter syntax.


E1002 message for django.forms.ModelForm subclasses, even under Python 3

Originally reported by: BitBucket: Jajcus, GitHub: @Jajcus?


Python 3 test code:

:::python
from django import forms
from .models import MyModel

class MyForm(forms.ModelForm):
    class Meta:
        model = MyModel
        fields = ("test",)

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

Pylint 0.25.1 generates:
E1002 'Use of super on an old style class' message which is wrong, because:

  1. This is a new-style class in Django (which heavily uses metaclasses)
  2. I am using Python 3. There are no 'old style classes' in Python 3 at all.

The problem is also discussed on StackOverflow: http://stackoverflow.com/questions/15257534/django-forms-modelform-pylint-and-new-old-style-classes


Simple check for unbalanced tuple unpacking in assignments

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore)


Hello!

The following bug bit me in a production environment and I was surprised that Pylint didn't warn me about it
After fiddling with checkers and astroid nodes, I've managed to pull off a small patch which reports this kind of problems. I took in account only tuple unpacking and handled only the assignments, so the patch could be small enough to be accepted. Also, I'm not a native english speaker and the wording in the patch can be improved.
Thank you for your time!

#!python

   a, b = "something1", "something2", "something3" # fails


False positive E1003 on Python 3 argument-less super()

Originally reported by: BitBucket: Jajcus, GitHub: @Jajcus?


Test Python 3 code (test.py):

:::python
class Base(object):
    def __init__(self):
        super().__init__()

Running 'pylint --include-ids=y --reports=n --disable=C0111,R0903 test' (using Python3 pylint) gives:

E1003:  2,4:Base.__init__: Bad first argument %r given to super class

There are three problems with that:

  • it is a valid Python 3 usage of super() (much more convenient that the one in Python 2), so no error should be reported
  • '%r' is not substituted with anything
  • super() is in line 3, not line 2

Pylint does not work with Python 2.5

Originally reported by: Anonymous


According to http://docs.pylint.org/installation.html#dependencies, "It should be compatible with any Python version >= 2.5".

In practice, it does not seem to work with 2.5. I get errors such as:

/home/travis/virtualenv/python2.5/lib/python2.5/site-packages/pylint/checkers/utils.py:402: Warning: 'as' will become a reserved keyword in Python 2.6
  File "/home/travis/virtualenv/python2.5/lib/python2.5/site-packages/pylint/checkers/utils.py", line 402
    except IndexError as error:
                       ^
SyntaxError: invalid syntax

It seems very few places use the "as" keyword. Can Python 2.5 backward compatibility be put back (it used to work a few weeks ago)?


Installation failure from mercurial

Originally reported by: George Sakkis (BitBucket: gsakkis, GitHub: @gsakkis?)


  1. Trying to install pylint from mercurial with pip fails because astroid is not on Pypi:
pip install -e hg+ssh://[email protected]/logilab/pylint#egg=pylint
...
Downloading/unpacking astroid>=0.24.3 (from pylint)
  Could not find any downloads that satisfy the requirement astroid>=0.24.3 (from pylint)
No distributions at all found for astroid>=0.24.3 (from pylint)
  1. Even after installing astroid manually, pylint fails to install correctly from a checkout through pip:
pip install -e hg+http://hg.logilab.org/pylint#egg=pylint
python -c "import pylint"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named pylint

The problem is that the package contents are copied directly under $VIRTUALENV/src/pylint/ instead of making a package
under it (i.e., .virtualenv/src/pylint/pylint).


pylint with Python3.3 raises KeyError processing some imports

Originally reported by: BitBucket: trampgeek, GitHub: @trampgeek?


Using pylint 0.28.0/astng 0.24.3/common 0.59.1 with Python 3.3 under RHEL fails with

Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/logilab/astng/manager.py", line 161, in file_from_module_name
value = self._mod_file_cache[(modname, contextfile)]
KeyError: ('posix', None)

when processing some imports, e.g. posix. The following test file is an example that triggers the above error (but it can occur indirectly, without a direct import of posix).

import posix
'''Comment'''
def sqr(n):
'''Function comment'''
return n * n

print(sqr(-9))

A fix (or probably hack) that seems to be working for me is to change line 624 of logilab/common/modutils.py from

... except ValueError:

to

... except (AttributeError, ValueError):

This ensures that the AttributeError that's raised (see full traceback attached) is treated as just another failure.


False positive E0213 no-self-argument for decorator which extends staticmethod

Originally reported by: BitBucket: mitar, GitHub: @mitar?


I have the following code:

#!python
def custom_decorator(platform=None, order=50):
    def wrapper(f):
        f.cgm_module = True
        f.cgm_module_order = order
        f.cgm_module_platform = platform
        return staticmethod(f)

    return wrapper

class SomeClass(object):
    @custom_decorator()
    def network(node, cfg):
        pass

And pylint complains that "Method should have "self" as first argument". But as this is a static method decorator in fact it should not need a "self" as first argument.

pylint 0.28.0,
astng 0.24.3, common 0.59.1


Prefer "open" to file constructor

Originally reported by: Julian O (BitBucket: oddthinking, GitHub: @oddthinking?)


Chapter 2 (Built-in Functions) of the Python Standard Library documentation (at least in Python 2.7.2) states:

When opening a file, it’s preferable to use open() instead of invoking the file constructor directly.

e.g. the following code is preferred:

with open("filename", "rb") as source_file:

to this:

with file("filename", "rb") as source_file:

I have no idea of the rationale of this rule, but I do know I have been violating it consistently!

To help people like me, please consider adding a new warning code for when the file constructor is used directly.

(I guess it should not trigger if in the init method of a subclass of file, but that might be rare enough to ignore.)


TypeError when analyzing Python file

Originally reported by: Anonymous


Hi all,

Got below error when ran Pylint 1.0 against one of my files.
I'm using Python 2.7.5 x86 Windows build.
File that causes this issue has 274 lines and looking at it I don't see anything highly unusual. Tried to remove each method from the file in turn and re-run Pylint, but it keeps crashing all the time. Also tried removing separate methods at once... no luck. Only removing the whole class from file (leaving only imports, log and nameduple definition) helped.

File contains a regular Python 2.x class deriving from object, defining class methods and generators (I'm using Twisted with it's defer.inlineCallbacks magic).

However, Pylint generally works on my other files using Twisted, I have no idea what's wrong with this one.

Any ideas?

My .pylintrc is attached.

#!python

Traceback (most recent call last):
  File "C:\Python27\Scripts\pylint", line 5, in <module>
    run_pylint()
  File "C:\Python27\lib\site-packages\pylint\__init__.py", line 21, in run_pylint
    Run(sys.argv[1:])
  File "C:\Python27\lib\site-packages\pylint\lint.py", line 1010, in __init__
    linter.check(args)
  File "C:\Python27\lib\site-packages\pylint\lint.py", line 599, in check
    self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)
  File "C:\Python27\lib\site-packages\pylint\lint.py", line 685, in check_astroid_module
    walker.walk(astroid)
  File "C:\Python27\lib\site-packages\pylint\utils.py", line 662, in walk
    self.walk(child)
  File "C:\Python27\lib\site-packages\pylint\utils.py", line 662, in walk
    self.walk(child)
  File "C:\Python27\lib\site-packages\pylint\utils.py", line 662, in walk
    self.walk(child)
  File "C:\Python27\lib\site-packages\pylint\utils.py", line 662, in walk
    self.walk(child)
  File "C:\Python27\lib\site-packages\pylint\utils.py", line 662, in walk
    self.walk(child)
  File "C:\Python27\lib\site-packages\pylint\utils.py", line 662, in walk
    self.walk(child)
  File "C:\Python27\lib\site-packages\pylint\utils.py", line 659, in walk
    cb(astroid)
  File "C:\Python27\lib\site-packages\pylint\checkers\typecheck.py", line 174, in visit_getattr
    if is_super(owner) or getattr(owner, 'type', None) == 'metaclass':
  File "C:\Python27\lib\site-packages\astroid\bases.py", line 51, in __getattr__
    return getattr(self._proxied, name)
  File "C:\Python27\lib\site-packages\astroid\scoped_nodes.py", line 680, in _class_type
    for base in klass.ancestors(recurs=False):
  File "C:\Python27\lib\site-packages\astroid\scoped_nodes.py", line 801, in ancestors
    for baseobj in stmt.infer(context):
TypeError: unbound method infer() must be called with Tuple instance as first argument (got InferenceContext instance instead)


IOError (never happened before new version was released).

Originally reported by: BitBucket: dotpot, GitHub: @dotpot?


It's all started after 1.0.0 release (0.28.0 now is not working as well (as it was working before 1.0.0 release), might be some dependant libs change on pylint end).

So pylint fails due to IOError and "missing" imports, BUT nosetests (running in the same environment) passes everything (in tests, classes using scipy are tested as well - so imports exists and everything is fine).

Here is traceback:

#!bash
$ pylint --rcfile=pylintrc ./ourProject
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/astroid/scoped_nodes.py", line 284, in getattr
    return [self.import_module(name, relative_only=True)]
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/astroid/scoped_nodes.py", line 339, in import_module
    return MANAGER.ast_from_module_name(absmodname)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/astroid/manager.py", line 121, in ast_from_module_name
    filepath = self.file_from_module_name(modname, context_file)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/astroid/manager.py", line 165, in file_from_module_name
    context_file=contextfile)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/logilab/common/modutils.py", line 295, in file_from_modpath
    return _file_from_modpath(modpath, path, context)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/logilab/common/modutils.py", line 554, in _file_from_modpath
    mtype, mp_filename = _module_file(modpath, path)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/logilab/common/modutils.py", line 659, in _module_file
    data = open(join(mp_filename, '__init__.py')).read(4096)
IOError: [Errno 2] No such file or directory: '/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/scipy/__init__.py'
************* Module ourProject.xx.xx.xxx
E:  7, 0: No name 'cluster' in module 'scipy' (no-name-in-module)
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7/bin/pylint", line 9, in <module>
    load_entry_point('pylint==1.0.0', 'console_scripts', 'pylint')()
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/pylint/__init__.py", line 21, in run_pylint
    Run(sys.argv[1:])
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/pylint/lint.py", line 1010, in __init__
    linter.check(args)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/pylint/lint.py", line 599, in check
    self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/pylint/lint.py", line 685, in check_astroid_module
    walker.walk(astroid)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/pylint/utils.py", line 662, in walk
    self.walk(child)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/pylint/utils.py", line 659, in walk
    cb(astroid)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/pylint/checkers/imports.py", line 228, in visit_import
    importedmodnode = self.get_imported_module(modnode, node, name)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/pylint/checkers/imports.py", line 266, in get_imported_module
    return importnode.do_import_module(modname)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/astroid/mixins.py", line 103, in do_import_module
    return mymodule.import_module(modname, level=level)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/astroid/scoped_nodes.py", line 345, in import_module
    return MANAGER.ast_from_module_name(modname)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/astroid/manager.py", line 121, in ast_from_module_name
    filepath = self.file_from_module_name(modname, context_file)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/astroid/manager.py", line 165, in file_from_module_name
    context_file=contextfile)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/logilab/common/modutils.py", line 295, in file_from_modpath
    return _file_from_modpath(modpath, path, context)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/logilab/common/modutils.py", line 554, in _file_from_modpath
    mtype, mp_filename = _module_file(modpath, path)
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/logilab/common/modutils.py", line 659, in _module_file
    data = open(join(mp_filename, '__init__.py')).read(4096)
IOError: [Errno 2] No such file or directory: '/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/scipy/__init__.py'

Any ideas? Solutions?


smoketest failures

Originally reported by: George Sakkis (BitBucket: gsakkis, GitHub: @gsakkis?)


Running smoketest.py gives 7 failures on the current tip (f56b411):

$ python test/smoketest.py 
.FFFFF...F..F.
======================================================================
FAIL: test1 (__main__.RunTC)
make pylint checking itself
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/smoketest.py", line 58, in test1
    self._runtest(['--include-ids=y', 'pylint.lint'], reporter=TextReporter(StringIO()))
  File "test/smoketest.py", line 42, in _runtest
    self.assertEqual(ex.code, code)
AssertionError: 4 != 28

======================================================================
FAIL: test2 (__main__.RunTC)
make pylint checking itself
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/smoketest.py", line 63, in test2
    self._runtest(['pylint.lint'], reporter=ParseableTextReporter(StringIO()))
  File "test/smoketest.py", line 42, in _runtest
    self.assertEqual(ex.code, code)
AssertionError: 4 != 28

======================================================================
FAIL: test3 (__main__.RunTC)
make pylint checking itself
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/smoketest.py", line 68, in test3
    self._runtest(['pylint.lint'], reporter=HTMLReporter(StringIO()))
  File "test/smoketest.py", line 42, in _runtest
    self.assertEqual(ex.code, code)
AssertionError: 4 != 28

======================================================================
FAIL: test4 (__main__.RunTC)
make pylint checking itself
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/smoketest.py", line 73, in test4
    self._runtest(['pylint.lint'], reporter=ColorizedTextReporter(StringIO()))
  File "test/smoketest.py", line 42, in _runtest
    self.assertEqual(ex.code, code)
AssertionError: 4 != 28

======================================================================
FAIL: test5 (__main__.RunTC)
make pylint checking itself
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/smoketest.py", line 78, in test5
    self._runtest(['pylint.lint'], reporter=VSTextReporter(StringIO()))
  File "test/smoketest.py", line 42, in _runtest
    self.assertEqual(ex.code, code)
AssertionError: 4 != 28

======================================================================
FAIL: test_generated_members (__main__.RunTC)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/smoketest.py", line 87, in test_generated_members
    self._runtest(['--generated-members=objects,DoesNotExist,delay,retry,"[a-zA-Z]+_set{1,2}""', 'pylint.lint'])
  File "test/smoketest.py", line 42, in _runtest
    self.assertEqual(ex.code, code)
AssertionError: 4 != 28

======================================================================
FAIL: test_no_out_encoding (__main__.RunTC)
test redirection of stdout with non ascii caracters
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/smoketest.py", line 128, in test_no_out_encoding
    out=strio)
  File "test/smoketest.py", line 42, in _runtest
    self.assertEqual(ex.code, code)
AssertionError: 20 != 28

----------------------------------------------------------------------
Ran 14 tests in 6.010s

FAILED (failures=7)

Pylint 0.28 throws an exception after parsing a finally block under Python 3.3

Originally reported by: Chris Wong (BitBucket: wongc, GitHub: @wongc?)


pylint will always throw (at least under my environment) an exception when processing any python code with a finally block.

e.g.::

#!python

  def main():
    fp = None
      try:
          fp = open('/tmp/foo.dat')
          data = fp.read()
          print(data)
      except OSError as exc:
          print("Oops no file")
      finally:
          if fp:
              fp.close()

  if __name__ == '__main__':
      main()

The backtrace::

#!

************* Module t2
  C0111:  1,0: Missing docstring
  C0111:  2,0:main: Missing docstring
  C0103:  3,4:main: Invalid name "fp" for type variable (should match
  [a-z_][a-z0-9_]{2,30}$)
  Traceback (most recent call last):
    File "/work/fwk-trunk/framework/lumberjack/virtualenv/bin/pylint", line 9, in <module>
    load_entry_point('pylint==0.28.0', 'console_scripts', 'pylint')()
    File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/pylint/__init__.py", line 21, in run_pylint
    Run(sys.argv[1:])
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/pylint/lint.py", line 995, in __init__
    linter.check(args)
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/pylint/lint.py", line 592, in check
    self.check_astng_module(astng, walker, rawcheckers)
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/pylint/lint.py", line 670, in check_astng_module
    walker.walk(astng)
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/pylint/utils.py", line 630, in walk
    self.walk(child)
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/pylint/utils.py", line 630, in walk
    self.walk(child)
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/pylint/utils.py", line 630, in walk
    self.walk(child)
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/pylint/utils.py", line 627, in walk
    cb(astng)
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/pylint/checkers/format.py", line 296, in visit_default
    prev_sibl = node.previous_sibling()
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/logilab/astng/bases.py", line 592, in previous_sibling
    stmts = self.parent.child_sequence(self)
  File "/work/fwk-trunk/framework/lumberjack/virtualenv/lib/python3.3/site-packages/logilab/astng/bases.py", line 445, in child_sequence
    raise ASTNGError(msg % (repr(child), repr(self)))
  logilab.astng.exceptions.ASTNGError: Could not found <TryExcept() l.None [t2] at Ox7fa5c95c9f10> in <Function(main) l.2 [t2] at Ox7fa5c95c9c10>'s children

pylint 1.0.0 requires non-existent logiloab-common 0.60.0

Originally reported by: Anonymous


I just tried to upgrade pylint to 1.0.0 (via pip), and when I try to run it, I get a VersionConflict traceback for a version of logilab-common that hasn't been released yet.

$ pylint -h
Traceback (most recent call last):
File "/usr/local/bin/pylint", line 5, in
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2854, in
parse_requirements(requires), Environment()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 598, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (logilab-common 0.59.1 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('logilab-common>=0.60.0'))


False positive E1120 no-value-for-parameter for class method

Originally reported by: BitBucket: mitar, GitHub: @mitar?


I have the following code:

#!python
class DisplayComponent(components.FrontendComponent):
    @classmethod
    def get_urls(cls):
        return super(DisplayComponent, cls).get_urls()

And pylint complains that "No value passed for parameter 'cls' in function call". Which is of course wrong as this is done automatically.

pylint 0.28.0,
astng 0.24.3, common 0.59.1


epylint doesn't work on Python 3

Originally reported by: BitBucket: jan_samohyl


Running epylint on Python 3.2 fails with:

Traceback (most recent call last):
File "/usr/local/bin/epylint", line 3, in
epylint.Run()
File "/usr/local/lib/python3.2/dist-packages/pylint/epylint.py", line 161, in Run
sys.exit(lint(sys.argv[1]))
File "/usr/local/lib/python3.2/dist-packages/pylint/epylint.py", line 96, in lint
if line.startswith("No config file found"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

I am attaching a small fix that seems to work for me.


Error while running checker pylint: dictionary changed size during iteration

Originally reported by: Pierre-Yves David (BitBucket: marmoute, GitHub: @marmoute?)


Trackback while running pylint on hgview

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apycotlib/atest.py", line 281, in run_checker
    status = checker.check(self)
  File "/usr/lib/python2.6/dist-packages/apycotlib/checkers/__init__.py", line 27, in check
    self.set_status(self.do_check(test))
  File "/usr/lib/python2.6/dist-packages/apycotlib/checkers/python.py", line 505, in do_check
    linter.check(pyinstall_path(test))
  File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 588, in check
    self._add_suppression_messages()
  File "/usr/lib/pymodules/python2.6/pylint/lint.py", line 711, in _add_suppression_messages
    for (warning, from_), lines in self._ignored_msgs.iteritems():
RuntimeError: dictionary changed size during iteration

You can see the details here: http://www.logilab.org/testexecution/129510?tab=pylint


false positive on setuptools.pkg_resources.get_distribution return value (E1103)

Originally reported by: Jace Browning (BitBucket: jacebrowning, GitHub: @jacebrowning?)


For the following code:

#!python

from pkg_resources import get_distribution
print(get_distribution('setuptools').version)

I get:

#!bash

E1103: 2,6: Instance of 'str' has no 'version' member (but some types could not be inferred)

Expected:

No warning should occur because the return value of get_distribution does, in fact, have a version member.

Version:

#!bash

pylint 0.28.0,
astng 0.24.3, common 0.59.1
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.